diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-07-10 11:51:34 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-07-10 11:51:34 +0200 |
commit | ffac1727b92167ca6847b7ae3adc71f091d8048f (patch) | |
tree | 7ff9c375782d347d6ef3da3a3d02b7e39aad3c44 /flake.nix | |
parent | 20e7a2a2544afd682f487327aa42d1899784db98 (diff) | |
download | nixos-ffac1727b92167ca6847b7ae3adc71f091d8048f.tar nixos-ffac1727b92167ca6847b7ae3adc71f091d8048f.tar.gz nixos-ffac1727b92167ca6847b7ae3adc71f091d8048f.tar.bz2 nixos-ffac1727b92167ca6847b7ae3adc71f091d8048f.tar.xz nixos-ffac1727b92167ca6847b7ae3adc71f091d8048f.zip |
...
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -176,10 +176,11 @@ | |||
176 | }; | 176 | }; |
177 | 177 | ||
178 | installerConfig = if pathExists ./installer.nix then "installer.nix" else (if pathExists ./installer then "installer" else null); | 178 | installerConfig = if pathExists ./installer.nix then "installer.nix" else (if pathExists ./installer then "installer" else null); |
179 | mkInstallerForSystem = system: (lib.systems.elaborate system).isLinux; | ||
179 | installers = | 180 | installers = |
180 | let mkInstallers = system: mapAttrs (mkInstaller system) (installerProfiles system); | 181 | let mkInstallers = system: mapAttrs (mkInstaller system) (installerProfiles system); |
181 | mkInstaller = system: name: {profile, output}: let mkOutput = output; in rec { config = mkNixosConfiguration [profile { config = { nixpkgs.system = system; }; }] ./. installerConfig "installer"; output = mkOutput config; }; | 182 | mkInstaller = system: name: {profile, output}: let mkOutput = output; in rec { config = mkNixosConfiguration [profile { config = { nixpkgs.system = system; }; }] ./. installerConfig "installer"; output = mkOutput config; }; |
182 | in forAllSystems (system: _systemPkgs: optionalAttrs (!(isNull installerConfig)) (mkInstallers system)); | 183 | in forAllSystems (system: _systemPkgs: optionalAttrs (!(isNull installerConfig) && mkInstallerForSystem system) (mkInstallers system)); |
183 | installerNixosConfigurations = listToAttrs (concatLists (mapAttrsToList (system: mapAttrsToList (profile: { config, ... }: nameValuePair ("installer-${system}-${profile}") config)) installers)); | 184 | installerNixosConfigurations = listToAttrs (concatLists (mapAttrsToList (system: mapAttrsToList (profile: { config, ... }: nameValuePair ("installer-${system}-${profile}") config)) installers)); |
184 | 185 | ||
185 | # packages = forAllSystems (system: systemPkgs: composeManyExtensions (attrValues self.overlays) self.legacyPackages.${system} systemPkgs); | 186 | # packages = forAllSystems (system: systemPkgs: composeManyExtensions (attrValues self.overlays) self.legacyPackages.${system} systemPkgs); |
@@ -240,5 +241,7 @@ | |||
240 | in mapAttrs (_n: v: if v ? "profiles" then v // { profiles = filterEnabled v.profiles; } else v) (filterEnabled (recursiveUpdate defaults overrides)); | 241 | in mapAttrs (_n: v: if v ? "profiles" then v // { profiles = filterEnabled v.profiles; } else v) (filterEnabled (recursiveUpdate defaults overrides)); |
241 | 242 | ||
242 | checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; | 243 | checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; |
244 | |||
245 | expr = self.nixosConfigurations.surtr.config.systemd.services.uwsgi.serviceConfig.ExecStart; | ||
243 | }; | 246 | }; |
244 | } | 247 | } |