nix-infra/modules/nixos/cherrykitten/default.nix
2024-06-05 09:09:28 +02:00

32 lines
804 B
Nix

{ config, lib, nodes, ... }:
let
cfg = config.cherrykitten;
in
{
options.cherrykitten = {
network = {
public_IPv4 = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
};
public_IPv6 = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
};
internal_IPv4 = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
};
internal_IPv6 = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
};
};
};
config = {
networking.hosts = {
"${nodes.ocelot.config.cherrykitten.network.internal_IPv4 }" = [ "ocelot" ];
"${nodes.serval.config.cherrykitten.network.internal_IPv4 }" = [ "serval" ];
};
};
}