expose hosts to build in flake
This commit is contained in:
parent
d6906e64a0
commit
4d8162522e
15
flake.nix
15
flake.nix
@ -126,7 +126,9 @@
|
|||||||
hostDefaults.system = "x86_64-linux";
|
hostDefaults.system = "x86_64-linux";
|
||||||
hostDefaults.channelName = "unstable";
|
hostDefaults.channelName = "unstable";
|
||||||
hosts = with nixpkgs.lib; let
|
hosts = with nixpkgs.lib; let
|
||||||
hostnames = builtins.attrNames (builtins.readDir ./machines);
|
hostnames =
|
||||||
|
filter (n: (builtins.match ".*(ISO|VM)" n) == null)
|
||||||
|
(builtins.attrNames (builtins.readDir ./machines));
|
||||||
mkHost = name: {
|
mkHost = name: {
|
||||||
system = builtins.readFile (./machines + "/${name}/system");
|
system = builtins.readFile (./machines + "/${name}/system");
|
||||||
modules = __attrValues self.customModules ++ [
|
modules = __attrValues self.customModules ++ [
|
||||||
@ -148,6 +150,11 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixosHostsCI = builtins.listToAttrs (map (name: {
|
||||||
|
inherit name;
|
||||||
|
value = self.nixosConfigurations."${name}".config.system.build.toplevel;
|
||||||
|
}) (builtins.attrNames self.nixosConfigurations));
|
||||||
|
|
||||||
outputsBuilder = channels: let
|
outputsBuilder = channels: let
|
||||||
pkgs = channels.unstable;
|
pkgs = channels.unstable;
|
||||||
# FIXME: nixos-rebuild with --flake flag doesn't work with doas
|
# FIXME: nixos-rebuild with --flake flag doesn't work with doas
|
||||||
@ -199,7 +206,6 @@
|
|||||||
./machines/Home-Hypervisor/autoinstall.nix
|
./machines/Home-Hypervisor/autoinstall.nix
|
||||||
./machines/AMD-Workstation/autoinstall.nix
|
./machines/AMD-Workstation/autoinstall.nix
|
||||||
./machines/Dell-Laptop/autoinstall.nix
|
./machines/Dell-Laptop/autoinstall.nix
|
||||||
./machines/NixOS-VM/autoinstall.nix
|
|
||||||
self.customModules.autoinstall
|
self.customModules.autoinstall
|
||||||
];
|
];
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
@ -216,11 +222,6 @@
|
|||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
format = "install-iso";
|
format = "install-iso";
|
||||||
};
|
};
|
||||||
# Build the entire system for uploading to attic
|
|
||||||
host-workstation = self.nixosConfigurations."AMD-Workstation".config.system.build.toplevel;
|
|
||||||
host-hypervisor = self.nixosConfigurations."Home-Hypervisor".config.system.build.toplevel;
|
|
||||||
host-dell = self.nixosConfigurations."Dell-Laptop".config.system.build.toplevel;
|
|
||||||
host-vps = self.nixosConfigurations."NixOS-VPS".config.system.build.toplevel;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user