diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2020-12-31 14:45:11 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2020-12-31 14:45:11 +0100 |
commit | eb2f80a1f801a05930eebda0f5c00a076097cdcf (patch) | |
tree | 3997c75ab38629bea7382dd8e7d393dfc0c56640 | |
parent | 34cf32a834a3b6abf46643e4cc6bc1a0d5f2992d (diff) | |
download | nixos-eb2f80a1f801a05930eebda0f5c00a076097cdcf.tar nixos-eb2f80a1f801a05930eebda0f5c00a076097cdcf.tar.gz nixos-eb2f80a1f801a05930eebda0f5c00a076097cdcf.tar.bz2 nixos-eb2f80a1f801a05930eebda0f5c00a076097cdcf.tar.xz nixos-eb2f80a1f801a05930eebda0f5c00a076097cdcf.zip |
Move extra modules to core profile
-rw-r--r-- | flake.nix | 13 | ||||
-rw-r--r-- | system-profiles/core.nix | 5 |
2 files changed, 11 insertions, 7 deletions
@@ -40,13 +40,12 @@ | |||
40 | }; | 40 | }; |
41 | modules = | 41 | modules = |
42 | let | 42 | let |
43 | extraModules = [ | 43 | defaultProfiles = with self.nixosModules.systemProfiles; |
44 | sops-nix.nixosModules.sops | 44 | [ core |
45 | home-manager.nixosModules.home-manager | 45 | ]; |
46 | ]; | 46 | |
47 | defaultProfiles = with self.nixosModules.systemProfiles; [core]; | ||
48 | local = "${toString dir}/${path}"; | 47 | local = "${toString dir}/${path}"; |
49 | global._module.args = { | 48 | argsModule._module.args = { |
50 | customUtils = utils; | 49 | customUtils = utils; |
51 | inherit hostName; | 50 | inherit hostName; |
52 | }; | 51 | }; |
@@ -56,7 +55,7 @@ | |||
56 | accountName' = splitString "@" n; | 55 | accountName' = splitString "@" n; |
57 | hostName' = elemAt accountName' 1; | 56 | hostName' = elemAt accountName' 1; |
58 | in hostName' == hostName; | 57 | in hostName' == hostName; |
59 | in extraModules ++ [ global ] ++ defaultProfiles ++ [ local ] ++ accountModules; | 58 | in [ argsModule ] ++ defaultProfiles ++ [ local ] ++ accountModules; |
60 | }; | 59 | }; |
61 | 60 | ||
62 | mkSystemProfile = dir: path: profileName: { | 61 | 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 @@ | |||
2 | let | 2 | let |
3 | profileSet = customUtils.types.attrNameSet flake.nixosModules.systemProfiles; | 3 | profileSet = customUtils.types.attrNameSet flake.nixosModules.systemProfiles; |
4 | in { | 4 | in { |
5 | imports = with flakeInputs; | ||
6 | [ sops-nix.nixosModules.sops | ||
7 | home-manager.nixosModules.home-manager | ||
8 | ]; | ||
9 | |||
5 | options = { | 10 | options = { |
6 | # See mkSystemProfile in ../flake.nix | 11 | # See mkSystemProfile in ../flake.nix |
7 | system.profiles = lib.mkOption { | 12 | system.profiles = lib.mkOption { |