42 lines
848 B
Nix
42 lines
848 B
Nix
{
|
|
inputs,
|
|
}:
|
|
{
|
|
mkHost =
|
|
{
|
|
name,
|
|
arch ? "x86_64-linux",
|
|
config_name ? name,
|
|
}:
|
|
inputs.nixpkgs.lib.nixosSystem {
|
|
system = arch;
|
|
modules = [
|
|
./hosts/base
|
|
./hosts/${config_name}
|
|
./nixosModules
|
|
(
|
|
{ ... }:
|
|
{
|
|
config = {
|
|
networking.hostName = name;
|
|
};
|
|
}
|
|
)
|
|
inputs.disko.nixosModules.disko
|
|
inputs.agenix.nixosModules.default
|
|
];
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
};
|
|
# TODO: this will actually be nice, so I can see IPs in main flake.nix,
|
|
# but also dont have three directories with only default.nix in it
|
|
# mkK3Snode = {
|
|
# name_prefix,
|
|
# id,
|
|
# ip
|
|
# }: mkHost {
|
|
# name = "${name_prefix}-${id}";
|
|
# config_name = "k3snode";
|
|
# };
|
|
}
|