diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -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 = ./.; |
