summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index 4893cd19..1218ef31 100644
--- a/flake.nix
+++ b/flake.nix
@@ -57,7 +57,7 @@
57 inherit (nixpkgs) lib; 57 inherit (nixpkgs) lib;
58 utils = import ./utils { inherit lib; }; 58 utils = import ./utils { inherit lib; };
59 inherit (utils) nixImport overrideModule; 59 inherit (utils) nixImport overrideModule;
60 inherit (lib) nixosSystem mkIf splitString filterAttrs listToAttrs mapAttrsToList nameValuePair concatMap composeManyExtensions mapAttrs mapAttrs' recursiveUpdate genAttrs unique elem optionalAttrs isDerivation concatLists concatStringsSep fix filter makeOverridable; 60 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;
61 inherit (lib.strings) escapeNixString; 61 inherit (lib.strings) escapeNixString;
62 62
63 accountUserName = accountName: 63 accountUserName = accountName:
@@ -145,6 +145,7 @@
145 forAllUsers = genAttrs (unique (map accountUserName (attrNames self.nixosModules.accounts))); 145 forAllUsers = genAttrs (unique (map accountUserName (attrNames self.nixosModules.accounts)));
146 146
147 activateNixosConfigurations = forAllSystems (system: _pkgs: mapAttrs' (hostName: nixosConfig: nameValuePair "${hostName}-activate" { type = "app"; program = "${nixosConfig.config.system.build.toplevel}/bin/switch-to-configuration"; }) self.nixosConfigurations); 147 activateNixosConfigurations = forAllSystems (system: _pkgs: mapAttrs' (hostName: nixosConfig: nameValuePair "${hostName}-activate" { type = "app"; program = "${nixosConfig.config.system.build.toplevel}/bin/switch-to-configuration"; }) self.nixosConfigurations);
148 activateHomeManagerConfigurations = forAllSystems (system: _pkgs: listToAttrs (concatLists (mapAttrsToList (hostName: nixosConfig: mapAttrsToList (userName: userCfg: nameValuePair "${userName}@${hostName}-activate" { type = "app"; program = "${userCfg.home.activationPackage}/activate"; }) nixosConfig.config.home-manager.users) self.nixosConfigurations)));
148 149
149 overlayPaths = nixImport rec { dir = ./overlays; _import = (path: _name: dir + "/${path}"); }; 150 overlayPaths = nixImport rec { dir = ./overlays; _import = (path: _name: dir + "/${path}"); };
150 151
@@ -187,7 +188,7 @@
187 188
188 legacyPackages = forAllSystems (system: systemPkgs: systemPkgs.override { overlays = attrValues self.overlays; }); 189 legacyPackages = forAllSystems (system: systemPkgs: systemPkgs.override { overlays = attrValues self.overlays; });
189 190
190 apps = activateNixosConfigurations; 191 apps = foldr recursiveUpdate {} [activateNixosConfigurations activateHomeManagerConfigurations];
191 192
192 devShells = forAllSystems (system: systemPkgs: { default = import ./shell.nix { 193 devShells = forAllSystems (system: systemPkgs: { default = import ./shell.nix {
193 pkgs = self.legacyPackages.${system}; 194 pkgs = self.legacyPackages.${system};