Add networkHost(s) types
This commit is contained in:
parent
1bfc4405b2
commit
868e6ca296
43
lib.nix
43
lib.nix
|
@ -70,4 +70,47 @@ in {
|
|||
getHostIpv6 getHostIps getDomainPostgresqlServer getSiteHosts getDomainHosts
|
||||
getSiteGatewayV4 getHostGatewayV4 getSiteGatewayV6 getHostGatewayV6
|
||||
getSiteV4PrefixLength getSiteV6PrefixLength;
|
||||
|
||||
fudo.types = with lib.types; rec {
|
||||
networkHost = { name, ... }: {
|
||||
hostname = mkOption {
|
||||
type = str;
|
||||
description = "Hostname";
|
||||
default = name;
|
||||
};
|
||||
|
||||
ipv4-address = mkOption {
|
||||
type = nullOr str;
|
||||
description = "The V4 IP of a given host, if any.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
ipv6-address = mkOption {
|
||||
type = nullOr str;
|
||||
description = "The V6 IP of a given host, if any.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
mac-address = mkOption {
|
||||
type = nullOr str;
|
||||
description =
|
||||
"The MAC address of a given host, if desired for IP reservation.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
description = mkOption {
|
||||
type = nullOr str;
|
||||
description = "Description of the host.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
sshfp-records = mkOption {
|
||||
type = listOf str;
|
||||
description = "List of SSHFP records for this host.";
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
networkHosts = attrsOf (submodule networkHost);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue