C'mon now
This commit is contained in:
parent
a0493a2eef
commit
2ff1389b1c
66
lib.nix
66
lib.nix
|
@ -71,8 +71,8 @@ in {
|
|||
getSiteGatewayV4 getHostGatewayV4 getSiteGatewayV6 getHostGatewayV6
|
||||
getSiteV4PrefixLength getSiteV6PrefixLength;
|
||||
|
||||
fudo-types = with lib.types; rec {
|
||||
networkHost = {
|
||||
fudo-types = with lib.types; {
|
||||
networkHost.options = {
|
||||
hostname = mkOption {
|
||||
type = str;
|
||||
description = "Hostname";
|
||||
|
@ -114,41 +114,43 @@ in {
|
|||
networkHosts = let
|
||||
# This is necessary because of the default 'name'...sigh.
|
||||
networkHostOpt = { name, ... }: {
|
||||
hostname = mkOption {
|
||||
type = str;
|
||||
description = "Hostname";
|
||||
default = name;
|
||||
};
|
||||
options = {
|
||||
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;
|
||||
};
|
||||
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;
|
||||
};
|
||||
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;
|
||||
};
|
||||
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;
|
||||
};
|
||||
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 = [ ];
|
||||
sshfp-records = mkOption {
|
||||
type = listOf str;
|
||||
description = "List of SSHFP records for this host.";
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
in attrsOf (submodule networkHostOpt);
|
||||
|
|
Loading…
Reference in New Issue