summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-03-23 19:58:38 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-03-23 19:58:38 +0100
commit96d1bcdcaa48668e41e1576a5773571b49d8c003 (patch)
tree194ea38c102dafc17e164ee374de23fe4f1e2151 /flake.nix
parent2745b97a8d3c451a2ca92a7c3cd16d5a20caca82 (diff)
downloadnixos-96d1bcdcaa48668e41e1576a5773571b49d8c003.tar
nixos-96d1bcdcaa48668e41e1576a5773571b49d8c003.tar.gz
nixos-96d1bcdcaa48668e41e1576a5773571b49d8c003.tar.bz2
nixos-96d1bcdcaa48668e41e1576a5773571b49d8c003.tar.xz
nixos-96d1bcdcaa48668e41e1576a5773571b49d8c003.zip
...
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix8
1 files changed, 2 insertions, 6 deletions
diff --git a/flake.nix b/flake.nix
index f1a2e434..ef7b3674 100644
--- a/flake.nix
+++ b/flake.nix
@@ -146,9 +146,7 @@
146 in forAllSystems (system: _systemPkgs: optionalAttrs (!(isNull installerConfig)) (mkInstallers system)); 146 in forAllSystems (system: _systemPkgs: optionalAttrs (!(isNull installerConfig)) (mkInstallers system));
147 installerNixosConfigurations = listToAttrs (concatLists (mapAttrsToList (system: mapAttrsToList (profile: { config, ... }: nameValuePair ("installer-${system}-${profile}") config)) installers)); 147 installerNixosConfigurations = listToAttrs (concatLists (mapAttrsToList (system: mapAttrsToList (profile: { config, ... }: nameValuePair ("installer-${system}-${profile}") config)) installers));
148 148
149 packages = 149 packages = forAllSystems (system: systemPkgs: composeManyExtensions (attrValues self.overlays) self.legacyPackages.${system} systemPkgs);
150 let installerPackages = system: optionalAttrs (!(isNull installerConfig)) (mapAttrs' (profile: value: nameValuePair "installer-${profile}" value.output) installers.${system});
151 in forAllSystems (system: systemPkgs: self.overlays.default (self.legacyPackages.${system}) systemPkgs // installerPackages system);
152 150
153 activateHomeManager = system: base: (deploy-rs.lib.${system}.activate.custom // { dryActivate = "DRY_RUN=1 $PROFILE/activate"; }) base.activationPackage "$PROFILE/activate"; 151 activateHomeManager = system: base: (deploy-rs.lib.${system}.activate.custom // { dryActivate = "DRY_RUN=1 $PROFILE/activate"; }) base.activationPackage "$PROFILE/activate";
154 in 152 in
@@ -166,9 +164,7 @@
166 homeModules = nixImport rec { dir = ./home-modules; }; 164 homeModules = nixImport rec { dir = ./home-modules; };
167 homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: configuration: nameValuePair "${username}@${hostname}" { inherit (configuration.home) activationPackage; }) nixosConfig.config.home-manager.users) self.nixosConfigurations)); 165 homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: configuration: nameValuePair "${username}@${hostname}" { inherit (configuration.home) activationPackage; }) nixosConfig.config.home-manager.users) self.nixosConfigurations));
168 166
169 overlays = let 167 overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths;
170 overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths;
171 in overlays // { default = final: prev: composeManyExtensions (attrValues overlays) final prev; };
172 overlays-path = forAllSystems (system: _: self.legacyPackages.${system}.writeText "overlays.nix" '' 168 overlays-path = forAllSystems (system: _: self.legacyPackages.${system}.writeText "overlays.nix" ''
173 map import (builtins.attrValues (builtins.fromJSON ${self.legacyPackages.${system}.lib.strings.escapeNixString (toJSON overlayPaths)})) 169 map import (builtins.attrValues (builtins.fromJSON ${self.legacyPackages.${system}.lib.strings.escapeNixString (toJSON overlayPaths)}))
174 ''); 170 '');