From eb2f80a1f801a05930eebda0f5c00a076097cdcf Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 31 Dec 2020 14:45:11 +0100 Subject: Move extra modules to core profile --- flake.nix | 13 ++++++------- system-profiles/core.nix | 5 +++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 1b2758e7..5ade9e1e 100644 --- a/flake.nix +++ b/flake.nix @@ -40,13 +40,12 @@ }; modules = let - extraModules = [ - sops-nix.nixosModules.sops - home-manager.nixosModules.home-manager - ]; - defaultProfiles = with self.nixosModules.systemProfiles; [core]; + defaultProfiles = with self.nixosModules.systemProfiles; + [ core + ]; + local = "${toString dir}/${path}"; - global._module.args = { + argsModule._module.args = { customUtils = utils; inherit hostName; }; @@ -56,7 +55,7 @@ accountName' = splitString "@" n; hostName' = elemAt accountName' 1; in hostName' == hostName; - in extraModules ++ [ global ] ++ defaultProfiles ++ [ local ] ++ accountModules; + in [ argsModule ] ++ defaultProfiles ++ [ local ] ++ accountModules; }; mkSystemProfile = dir: path: profileName: { diff --git a/system-profiles/core.nix b/system-profiles/core.nix index 2af82703..f009c178 100644 --- a/system-profiles/core.nix +++ b/system-profiles/core.nix @@ -2,6 +2,11 @@ let profileSet = customUtils.types.attrNameSet flake.nixosModules.systemProfiles; in { + imports = with flakeInputs; + [ sops-nix.nixosModules.sops + home-manager.nixosModules.home-manager + ]; + options = { # See mkSystemProfile in ../flake.nix system.profiles = lib.mkOption { -- cgit v1.2.3