diff options
author | Tony Olagbaiye <me@fron.io> | 2020-08-26 07:13:05 +0100 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2020-08-26 23:49:12 +0200 |
commit | 6cf6b587b575493e7718bf08b209013d7dcf4d58 (patch) | |
tree | 479a4e6aaac438bba809d7e01cd43113aa11c4d8 | |
parent | a79d31fcfd156c4feda6c19d8490b16edb7c1c75 (diff) |
flake: add flake.nix
No flake.lock is added because the only input (nixpkgs) will almost
always be overridden, and currently Home Manager's testing and
verification is not flake based.
PR #1455
-rw-r--r-- | .github/CODEOWNERS | 2 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | flake.nix | 21 |
3 files changed, 24 insertions, 0 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5aa1f6c4e19..dccdc8f8ec8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,7 @@ * @rycee +/flake.nix @bqv @kisik21 + /modules/home-environment.nix @rycee /modules/misc/dconf.nix @gnidorah @rycee diff --git a/.gitignore b/.gitignore index d6944e3ddc1..3526db71892 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +/flake.lock /result* diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000000..697f66ac8e6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + description = "Home Manager for Nix"; + + outputs = { self, nixpkgs }: rec { + nixosModules.home-manager = import ./nixos; + + lib = { + homeManagerConfiguration = { configuration, system, homeDirectory + , username + , pkgs ? builtins.getAttr system nixpkgs.outputs.legacyPackages + , check ? true }@args: + import ./modules { + inherit pkgs check; + configuration = { ... }: { + imports = [ configuration ]; + home = { inherit homeDirectory username; }; + }; + }; + }; + }; +} |