diff options
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 | } |
