Split ISO config from installed hosts; auto-include gnome in generated host
This commit is contained in:
parent
ec1bb28713
commit
e927339625
4 changed files with 44 additions and 7 deletions
20
flake.nix
20
flake.nix
|
|
@ -13,16 +13,28 @@
|
|||
let
|
||||
lib = nixpkgs.lib;
|
||||
hostFiles = builtins.attrNames (builtins.readDir ./hosts);
|
||||
hostNames = lib.filter (name:
|
||||
lib.hasSuffix ".nix" name && !(lib.hasSuffix "-hardware.nix" name)
|
||||
) hostFiles;
|
||||
hostNames =
|
||||
lib.filter (name:
|
||||
lib.hasSuffix ".nix" name
|
||||
&& !(lib.hasSuffix "-hardware.nix" name)
|
||||
&& name != "iso.nix"
|
||||
)
|
||||
hostFiles;
|
||||
mkHost = name: lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [ (./hosts + "/${name}.nix") ];
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = lib.genAttrs (map (lib.removeSuffix ".nix") hostNames) mkHost;
|
||||
nixosConfigurations =
|
||||
lib.genAttrs (map (lib.removeSuffix ".nix") hostNames) mkHost
|
||||
// {
|
||||
installer = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [ ./hosts/iso.nix ];
|
||||
};
|
||||
};
|
||||
|
||||
packages.x86_64-linux.install-iso =
|
||||
self.nixosConfigurations.installer.config.system.build.isoImage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue