From b1d54aef28be2d1d75dbec6a28964f397efa5072 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Sat, 19 Aug 2023 23:40:25 +0200 Subject: [PATCH] Add flakes --- flake.lock | 47 +++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..7201828 --- /dev/null +++ b/flake.lock @@ -0,0 +1,47 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1692448348, + "narHash": "sha256-/Wy9Bzw59A5OD82S9dWHshg+wiSzJNh95hPXNhO5K7E=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "bdb5bcad01ff7332fdcf4b128211e81905113f84", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1692356644, + "narHash": "sha256-AYkPFT+CbCVSBmh0WwIzPpwhEJ4Yy3A7JZvUkGJIg5o=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8ecc900b2f695d74dea35a92f8a9f9b32c8ea33d", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..fa5be69 --- /dev/null +++ b/flake.nix @@ -0,0 +1,44 @@ +{ + description = "System config"; + + inputs = { + nixpkgs.url = "nixpkgs/nixos-unstable"; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { nixpkgs, home-manager, ...}@inputs: + let + inherit (nixpkgs) lib; + + util = import ./lib { + inherit system pkgs home-manager lib; overlays = (pkgs.overlays); + }; + + inherit (util) user; + inherit (util) host; + + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + overlays = []; + }; + + system = "x86_64-linux"; + in { + homeManagerConfigurations = { + jq = user.mkHMUser { + + }; + }; + + nixosConfigurations = { + laptop = host.mkHost { + + }; + }; + }; +}