summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-03-23 20:23:52 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-03-23 20:23:52 +0100
commit5e6421293925721616c97151d6705cb7b2594af3 (patch)
tree754ed8ebed5eb9b70725f34f109dccb64a55516f /flake.nix
parent96d1bcdcaa48668e41e1576a5773571b49d8c003 (diff)
downloadnixos-5e6421293925721616c97151d6705cb7b2594af3.tar
nixos-5e6421293925721616c97151d6705cb7b2594af3.tar.gz
nixos-5e6421293925721616c97151d6705cb7b2594af3.tar.bz2
nixos-5e6421293925721616c97151d6705cb7b2594af3.tar.xz
nixos-5e6421293925721616c97151d6705cb7b2594af3.zip
...
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/flake.nix b/flake.nix
index ef7b3674..c8c4c365 100644
--- a/flake.nix
+++ b/flake.nix
@@ -45,6 +45,7 @@
45 utils = import ./utils { inherit lib; }; 45 utils = import ./utils { inherit lib; };
46 inherit (utils) nixImport overrideModule; 46 inherit (utils) nixImport overrideModule;
47 inherit (lib) nixosSystem mkIf splitString filterAttrs listToAttrs mapAttrsToList nameValuePair concatMap composeManyExtensions mapAttrs mapAttrs' recursiveUpdate genAttrs unique elem optionalAttrs isDerivation concatLists concatStringsSep; 47 inherit (lib) nixosSystem mkIf splitString filterAttrs listToAttrs mapAttrsToList nameValuePair concatMap composeManyExtensions mapAttrs mapAttrs' recursiveUpdate genAttrs unique elem optionalAttrs isDerivation concatLists concatStringsSep;
48 inherit (lib.strings) escapeNixString;
48 49
49 accountUserName = accountName: 50 accountUserName = accountName:
50 let 51 let
@@ -165,9 +166,9 @@
165 homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: configuration: nameValuePair "${username}@${hostname}" { inherit (configuration.home) activationPackage; }) nixosConfig.config.home-manager.users) self.nixosConfigurations)); 166 homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: configuration: nameValuePair "${username}@${hostname}" { inherit (configuration.home) activationPackage; }) nixosConfig.config.home-manager.users) self.nixosConfigurations));
166 167
167 overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths; 168 overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths;
168 overlays-path = forAllSystems (system: _: self.legacyPackages.${system}.writeText "overlays.nix" '' 169 overlays-path = forAllSystems (system: systemPkgs: toString (systemPkgs.writeText "overlays.nix" ''
169 map import (builtins.attrValues (builtins.fromJSON ${self.legacyPackages.${system}.lib.strings.escapeNixString (toJSON overlayPaths)})) 170 map import (builtins.attrValues (builtins.fromJSON ${escapeNixString (toJSON overlayPaths)}))
170 ''); 171 ''));
171 172
172 packages = mapAttrs (_name: filterAttrs (_name: isDerivation)) packages; 173 packages = mapAttrs (_name: filterAttrs (_name: isDerivation)) packages;
173 packages' = mapAttrs (_name: filterAttrs (_name: value: !(isDerivation value))) packages; 174 packages' = mapAttrs (_name: filterAttrs (_name: value: !(isDerivation value))) packages;