summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2023-08-08 21:48:11 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2023-08-08 21:48:11 +0200
commit6bc9ae25153a292b5e34ec0b891d83c98b1d5e8a (patch)
tree4497d93ad2d46c04e311bf87755fbf6c42b56c7f /flake.nix
parentdf4f7efea1570050ba3f1828e41419304606e212 (diff)
downloadnixos-6bc9ae25153a292b5e34ec0b891d83c98b1d5e8a.tar
nixos-6bc9ae25153a292b5e34ec0b891d83c98b1d5e8a.tar.gz
nixos-6bc9ae25153a292b5e34ec0b891d83c98b1d5e8a.tar.bz2
nixos-6bc9ae25153a292b5e34ec0b891d83c98b1d5e8a.tar.xz
nixos-6bc9ae25153a292b5e34ec0b891d83c98b1d5e8a.zip
...
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index fd18ba0b..746c9134 100644
--- a/flake.nix
+++ b/flake.nix
@@ -133,7 +133,7 @@
133 utils = import ./utils { inherit lib; }; 133 utils = import ./utils { inherit lib; };
134 inherit (utils) nixImport overrideModule; 134 inherit (utils) nixImport overrideModule;
135 inherit (lib) nixosSystem mkIf splitString filterAttrs listToAttrs mapAttrsToList nameValuePair concatMap composeManyExtensions mapAttrs mapAttrs' recursiveUpdate genAttrs unique elem optionalAttrs isDerivation concatLists concatStringsSep fix filter makeOverridable foldr; 135 inherit (lib) nixosSystem mkIf splitString filterAttrs listToAttrs mapAttrsToList nameValuePair concatMap composeManyExtensions mapAttrs mapAttrs' recursiveUpdate genAttrs unique elem optionalAttrs isDerivation concatLists concatStringsSep fix filter makeOverridable foldr;
136 inherit (lib.strings) escapeNixString; 136 inherit (lib.strings) escapeNixString hasSuffix;
137 137
138 accountUserName = accountName: 138 accountUserName = accountName:
139 let 139 let
@@ -225,6 +225,9 @@
225 225
226 activateNixosConfigurations = forAllSystems (system: _pkgs: filterAttrs (_n: v: v != null) (mapAttrs' (hostName: nixosConfig: nameValuePair "${hostName}-activate" (if system == nixosConfig.config.nixpkgs.system then { type = "app"; program = "${nixosConfig.config.system.build.toplevel}/bin/switch-to-configuration"; } else null)) self.nixosConfigurations)); 226 activateNixosConfigurations = forAllSystems (system: _pkgs: filterAttrs (_n: v: v != null) (mapAttrs' (hostName: nixosConfig: nameValuePair "${hostName}-activate" (if system == nixosConfig.config.nixpkgs.system then { type = "app"; program = "${nixosConfig.config.system.build.toplevel}/bin/switch-to-configuration"; } else null)) self.nixosConfigurations));
227 activateHomeManagerConfigurations = forAllSystems (system: _pkgs: filterAttrs (_n: v: v != null) (listToAttrs (concatLists (mapAttrsToList (hostName: nixosConfig: mapAttrsToList (userName: userCfg: nameValuePair "${userName}@${hostName}-activate" (if system == nixosConfig.config.nixpkgs.system then { type = "app"; program = "${userCfg.home.activationPackage}/activate"; } else null)) nixosConfig.config.home-manager.users) self.nixosConfigurations)))); 227 activateHomeManagerConfigurations = forAllSystems (system: _pkgs: filterAttrs (_n: v: v != null) (listToAttrs (concatLists (mapAttrsToList (hostName: nixosConfig: mapAttrsToList (userName: userCfg: nameValuePair "${userName}@${hostName}-activate" (if system == nixosConfig.config.nixpkgs.system then { type = "app"; program = "${userCfg.home.activationPackage}/activate"; } else null)) nixosConfig.config.home-manager.users) self.nixosConfigurations))));
228 installerShells = system: pkgs: mapAttrs (installerName: config: pkgs.callPackage ./installer/shell.nix {
229 inherit system installerName config;
230 }) (filterAttrs (n: _v: hasSuffix "-netboot" n) installerNixosConfigurations);
228 231
229 overlayPaths = nixImport rec { dir = ./overlays; _import = (path: _name: dir + "/${path}"); }; 232 overlayPaths = nixImport rec { dir = ./overlays; _import = (path: _name: dir + "/${path}"); };
230 233
@@ -270,7 +273,7 @@
270 273
271 apps = foldr recursiveUpdate {} [activateNixosConfigurations activateHomeManagerConfigurations]; 274 apps = foldr recursiveUpdate {} [activateNixosConfigurations activateHomeManagerConfigurations];
272 275
273 devShells = forAllSystems (system: systemPkgs: { default = import ./shell.nix ({ inherit system; } // inputs); }); 276 devShells = forAllSystems (system: systemPkgs: { default = import ./shell.nix ({ inherit system; } // inputs); } // installerShells system systemPkgs);
274 277
275 templates.default = { 278 templates.default = {
276 path = ./.; 279 path = ./.;