diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-05-26 13:58:07 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-05-26 13:58:07 +0200 |
commit | fc6cf6169868e60c189e4b243330c3717ff159f3 (patch) | |
tree | 3f6dea9c1420e23756257b5abea27ec9ed92d58a /flake.nix | |
parent | 84f2affd66a0ff3947b91a30308cb8e6a8ff7594 (diff) | |
download | nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar.gz nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar.bz2 nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar.xz nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.zip |
...
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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}; |