forked from mirrors_public/oddlama_nix-config
feat: modularize hetzner-cloud and odroid-n2plus hardware
This commit is contained in:
parent
61d582f033
commit
6672846d59
11 changed files with 79 additions and 35 deletions
|
@ -26,6 +26,7 @@
|
|||
mkOption
|
||||
optionalAttrs
|
||||
optionals
|
||||
stringLength
|
||||
types
|
||||
;
|
||||
|
||||
|
@ -132,6 +133,10 @@
|
|||
assertion = isClient -> ((wgCfgOf wgCfg.client.via).server.host != null);
|
||||
message = "${assertionPrefix}: The specified via node '${wgCfg.client.via}' must be a wireguard server.";
|
||||
}
|
||||
{
|
||||
assertion = stringLength wgCfg.linkName < 16;
|
||||
message = "${assertionPrefix}: The specified linkName '${wgCfg.linkName}' is too long (must be max 15 characters).";
|
||||
}
|
||||
# TODO at least 3 network participants and (externalPeers != {} or someone has via set to us) -> ip forwarding
|
||||
];
|
||||
|
||||
|
@ -331,7 +336,7 @@ in {
|
|||
};
|
||||
|
||||
linkName = mkOption {
|
||||
default = "wg-${name}";
|
||||
default = name;
|
||||
type = types.str;
|
||||
description = mdDoc "The name for the created network interface.";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue