summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix21
-rw-r--r--system-profiles/core.nix5
2 files changed, 16 insertions, 10 deletions
diff --git a/flake.nix b/flake.nix
index 3ad3d6c9..51959fb6 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,5 +1,7 @@
1{ 1let
2 description = "gkleen's machines"; 2 description = "GKleen's flakey nixos configuration";
3in {
4 inherit description;
3 5
4 inputs = { 6 inputs = {
5 nixpkgs = { 7 nixpkgs = {
@@ -40,13 +42,12 @@
40 }; 42 };
41 modules = 43 modules =
42 let 44 let
43 extraModules = [ 45 defaultProfiles = with self.nixosModules.systemProfiles;
44 sops-nix.nixosModules.sops 46 [ core
45 home-manager.nixosModules.home-manager 47 ];
46 ]; 48
47 defaultProfiles = with self.nixosModules.systemProfiles; [core];
48 local = "${toString dir}/${path}"; 49 local = "${toString dir}/${path}";
49 global._module.args = { 50 argsModule._module.args = {
50 customUtils = utils; 51 customUtils = utils;
51 inherit hostName; 52 inherit hostName;
52 }; 53 };
@@ -56,7 +57,7 @@
56 accountName' = splitString "@" n; 57 accountName' = splitString "@" n;
57 hostName' = elemAt accountName' 1; 58 hostName' = elemAt accountName' 1;
58 in hostName' == hostName; 59 in hostName' == hostName;
59 in extraModules ++ [ global ] ++ defaultProfiles ++ [ local ] ++ accountModules; 60 in [ argsModule ] ++ defaultProfiles ++ [ local ] ++ accountModules;
60 }; 61 };
61 62
62 mkSystemProfile = dir: path: profileName: { 63 mkSystemProfile = dir: path: profileName: {
@@ -104,7 +105,7 @@
104 105
105 defaultTemplate = { 106 defaultTemplate = {
106 path = ./.; 107 path = ./.;
107 description = "A flakey nixos configuration."; 108 inherit description;
108 }; 109 };
109 }; 110 };
110} 111}
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 @@
2let 2let
3 profileSet = customUtils.types.attrNameSet flake.nixosModules.systemProfiles; 3 profileSet = customUtils.types.attrNameSet flake.nixosModules.systemProfiles;
4in { 4in {
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 {