mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 12:51:34 +01:00
networking: Set overlay options in nebula module
This commit is contained in:
parent
7b8435a555
commit
82844a3bb4
2 changed files with 14 additions and 9 deletions
|
|
@ -21,18 +21,15 @@ in
|
||||||
overlay = {
|
overlay = {
|
||||||
networkAddress = lib.mkOption {
|
networkAddress = lib.mkOption {
|
||||||
type = lib.types.nonEmptyStr;
|
type = lib.types.nonEmptyStr;
|
||||||
default = "10.254.250.0";
|
default = "";
|
||||||
readOnly = true;
|
|
||||||
};
|
};
|
||||||
prefixLength = lib.mkOption {
|
prefixLength = lib.mkOption {
|
||||||
type = lib.types.ints.between 0 32;
|
type = lib.types.nullOr (lib.types.ints.between 0 32);
|
||||||
default = 24;
|
default = null;
|
||||||
readOnly = true;
|
|
||||||
};
|
};
|
||||||
domain = lib.mkOption {
|
domain = lib.mkOption {
|
||||||
type = lib.types.nonEmptyStr;
|
type = lib.types.nonEmptyStr;
|
||||||
default = "splitleaf.de";
|
default = "";
|
||||||
readOnly = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
address = lib.mkOption {
|
address = lib.mkOption {
|
||||||
|
|
@ -41,11 +38,11 @@ in
|
||||||
};
|
};
|
||||||
interface = lib.mkOption {
|
interface = lib.mkOption {
|
||||||
type = lib.types.nonEmptyStr;
|
type = lib.types.nonEmptyStr;
|
||||||
default = "nebula";
|
default = "";
|
||||||
};
|
};
|
||||||
systemdUnit = lib.mkOption {
|
systemdUnit = lib.mkOption {
|
||||||
type = lib.types.nonEmptyStr;
|
type = lib.types.nonEmptyStr;
|
||||||
default = "nebula@mesh.service";
|
default = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
dnsServers = lib.mkOption {
|
dnsServers = lib.mkOption {
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,14 @@ in
|
||||||
message = "'${netCfg.hostname}' is a Nebula lighthouse, but underlay.isPublic is not set. Lighthouses must be publicly reachable.";
|
message = "'${netCfg.hostname}' is a Nebula lighthouse, but underlay.isPublic is not set. Lighthouses must be publicly reachable.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
custom.networking.overlay = {
|
||||||
|
networkAddress = "10.254.250.0";
|
||||||
|
prefixLength = 24;
|
||||||
|
domain = "splitleaf.de";
|
||||||
|
interface = "nebula";
|
||||||
|
systemdUnit = "nebula@mesh.service";
|
||||||
|
};
|
||||||
|
|
||||||
meta.ports.udp = lib.optional netCfg.underlay.isPublic publicPort;
|
meta.ports.udp = lib.optional netCfg.underlay.isPublic publicPort;
|
||||||
|
|
||||||
sops.secrets."nebula/host-key" = {
|
sops.secrets."nebula/host-key" = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue