From 6bc9ae25153a292b5e34ec0b891d83c98b1d5e8a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 8 Aug 2023 21:48:11 +0200 Subject: ... --- flake.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index fd18ba0b..746c9134 100644 --- a/flake.nix +++ b/flake.nix @@ -133,7 +133,7 @@ utils = import ./utils { inherit lib; }; inherit (utils) nixImport overrideModule; 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; - inherit (lib.strings) escapeNixString; + inherit (lib.strings) escapeNixString hasSuffix; accountUserName = accountName: let @@ -225,6 +225,9 @@ 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)); 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)))); + installerShells = system: pkgs: mapAttrs (installerName: config: pkgs.callPackage ./installer/shell.nix { + inherit system installerName config; + }) (filterAttrs (n: _v: hasSuffix "-netboot" n) installerNixosConfigurations); overlayPaths = nixImport rec { dir = ./overlays; _import = (path: _name: dir + "/${path}"); }; @@ -270,7 +273,7 @@ apps = foldr recursiveUpdate {} [activateNixosConfigurations activateHomeManagerConfigurations]; - devShells = forAllSystems (system: systemPkgs: { default = import ./shell.nix ({ inherit system; } // inputs); }); + devShells = forAllSystems (system: systemPkgs: { default = import ./shell.nix ({ inherit system; } // inputs); } // installerShells system systemPkgs); templates.default = { path = ./.; -- cgit v1.2.3