nebula: Auto enable as default overlay implementation

This commit is contained in:
SebastianStork 2026-01-31 01:53:30 +01:00
parent 27b5c57023
commit a14692c6d6
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
7 changed files with 9 additions and 6 deletions

View file

@ -21,6 +21,7 @@ in
prefixLength = lib.mkOption {
type = lib.types.ints.between 0 32;
default = cfg.networkCidr |> lib.splitString "/" |> lib.last |> lib.toInt;
readOnly = true;
};
domain = lib.mkOption {
type = lib.types.nonEmptyStr;
@ -61,5 +62,10 @@ in
|> lib.filter (host: host.config.custom.services.dns.enable)
|> lib.map (host: host.config.custom.networking.overlay.address);
};
implementation = lib.mkOption {
type = lib.types.enum [ "nebula" ];
default = "nebula";
};
};
}

View file

@ -12,7 +12,9 @@ let
in
{
options.custom.services.nebula = {
enable = lib.mkEnableOption "";
enable = lib.mkEnableOption "" // {
default = netCfg.overlay.implementation == "nebula";
};
publicKeyPath = lib.mkOption {
type = lib.types.path;