From 6cf6b587b575493e7718bf08b209013d7dcf4d58 Mon Sep 17 00:00:00 2001 From: Tony Olagbaiye Date: Wed, 26 Aug 2020 07:13:05 +0100 Subject: [PATCH] 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 --- .github/CODEOWNERS | 2 ++ .gitignore | 1 + flake.nix | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 flake.nix diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5aa1f6c4..dccdc8f8 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 d6944e3d..3526db71 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +/flake.lock /result* diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..697f66ac --- /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; }; + }; + }; + }; + }; +}