machines-config/lib.nix

33 lines
487 B
Nix
Raw Normal View History

2024-12-18 11:34:20 +01:00
{
nixpkgs,
inputs,
}:
{
2024-12-19 00:02:50 +01:00
mkHost =
2024-12-20 00:06:32 +01:00
{
name,
arch ? "x86_64-linux",
}:
2024-12-19 00:02:50 +01:00
nixpkgs.lib.nixosSystem {
2024-12-18 11:34:20 +01:00
system = arch;
modules = [
2024-12-20 10:03:05 +01:00
./hosts/base
./hosts/${name}
2024-12-18 11:34:20 +01:00
./nixosModules
2024-12-19 00:02:50 +01:00
(
{ ... }:
{
config = {
networking.hostName = name;
};
}
)
2024-12-20 10:03:05 +01:00
inputs.disko.nixosModules.disko
2024-12-18 11:34:20 +01:00
];
specialArgs = {
inherit inputs;
};
};
}