diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2020-12-31 14:45:11 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-01-03 20:17:36 +0100 |
| commit | 226b82e61352cb1c68d2a68bfb557c13941b050c (patch) | |
| tree | c199702d73f87994eaf99185180c31df6329fb4e | |
| parent | 055dd32001bdc96fcee3ba0159ae9bb7c922d4b6 (diff) | |
| download | nixos-226b82e61352cb1c68d2a68bfb557c13941b050c.tar nixos-226b82e61352cb1c68d2a68bfb557c13941b050c.tar.gz nixos-226b82e61352cb1c68d2a68bfb557c13941b050c.tar.bz2 nixos-226b82e61352cb1c68d2a68bfb557c13941b050c.tar.xz nixos-226b82e61352cb1c68d2a68bfb557c13941b050c.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 { |
