1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: modularize hetzner-cloud and odroid-n2plus hardware

This commit is contained in:
oddlama 2023-05-31 16:34:13 +02:00
parent 61d582f033
commit 6672846d59
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
11 changed files with 79 additions and 35 deletions

View file

@ -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.";
};