From 9248259708bd6ade5e334a2cdfb29d2a20acb0dd Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 3 Oct 2022 17:15:36 +0200 Subject: ... --- flake.nix | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index defcd864..43825563 100644 --- a/flake.nix +++ b/flake.nix @@ -157,7 +157,10 @@ # systemsSelector = "x86_64-linux"; # systems = filter (system: !(isNull (builtins.match systemsSelector system))) nixpkgs.lib.systems.flakeExposed; - systems = nixpkgs.lib.systems.flakeExposed; + systems = + let + disallowedSystems = ["armv5tel-linux"]; + in filter (system: !(elem system disallowedSystems)) nixpkgs.lib.systems.flakeExposed; nixpkgsPackages = localSystem: (makeOverridable (import (nixpkgs.outPath + "/pkgs/top-level"))) { inherit localSystem; }; forAllSystems = f: mapAttrs f (genAttrs systems nixpkgsPackages); forAllUsers = genAttrs (unique (map accountUserName (attrNames self.nixosModules.accounts))); @@ -167,20 +170,18 @@ overlayPaths = nixImport rec { dir = ./overlays; _import = (path: _name: dir + "/${path}"); }; - installerProfiles = system: - let nixpkgs-path = nixpkgs.outPath; - in mapAttrs (name: {path, output}: { profile = mkSystemProfile nixpkgs-path path "installer-${name}"; inherit output; }) - { cd-dvd = { path = "nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"; output = out: out.config.system.build.isoImage; }; - netboot = { path = "nixos/modules/installer/netboot/netboot-minimal.nix"; output = out: (self.legacyPackages.${system}.symlinkJoin { name = "netboot"; paths = with out.config.system.build; [ netbootRamdisk kernel netbootIpxeScript ]; preferLocalBuild = true; }); }; - }; + installerProfiles = nixImport rec { + dir = ./installer-profiles; + _import = path: name: mkSystemProfile dir path "installer-${name}"; + }; installerConfig = if pathExists ./installer.nix then "installer.nix" else (if pathExists ./installer then "installer" else null); mkInstallerForSystem = system: (lib.systems.elaborate system).isLinux; installers = - let mkInstallers = system: mapAttrs (mkInstaller system) (installerProfiles system); - mkInstaller = system: name: {profile, output}: let mkOutput = output; in rec { config = mkNixosConfiguration [profile { config = { nixpkgs.system = system; }; }] ./. installerConfig "installer"; output = mkOutput config; }; + let mkInstallers = system: mapAttrs (mkInstaller system) installerProfiles; + mkInstaller = system: name: profile: mkNixosConfiguration [profile { config = { nixpkgs.system = system; }; }] ./. installerConfig "installer"; in forAllSystems (system: _systemPkgs: optionalAttrs (!(isNull installerConfig) && mkInstallerForSystem system) (mkInstallers system)); - installerNixosConfigurations = listToAttrs (concatLists (mapAttrsToList (system: mapAttrsToList (profile: { config, ... }: nameValuePair ("installer-${system}-${profile}") config)) installers)); + installerNixosConfigurations = listToAttrs (concatLists (mapAttrsToList (system: mapAttrsToList (profile: config: nameValuePair ("installer-${system}-${profile}") config)) installers)); # packages = forAllSystems (system: systemPkgs: composeManyExtensions (attrValues self.overlays) self.legacyPackages.${system} systemPkgs); -- cgit v1.2.3