From a14692c6d6dc36486e42313b126788a88f9a38bd Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Sat, 31 Jan 2026 01:53:30 +0100 Subject: [PATCH] nebula: Auto enable as default overlay implementation --- hosts/desktop/default.nix | 1 - hosts/laptop/default.nix | 1 - hosts/vps-monitor/default.nix | 1 - hosts/vps-private/default.nix | 1 - hosts/vps-public/default.nix | 1 - modules/system/networking/overlay.nix | 6 ++++++ modules/system/services/nebula/default.nix | 4 +++- 7 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 9658d34..6438e32 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -37,7 +37,6 @@ services = { auto-gc.enable = true; sound.enable = true; - nebula.enable = true; sshd.enable = true; syncthing = { enable = true; diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix index 62c532a..7e72934 100644 --- a/hosts/laptop/default.nix +++ b/hosts/laptop/default.nix @@ -39,7 +39,6 @@ auto-gc.enable = true; bluetooth.enable = true; sound.enable = true; - nebula.enable = true; sshd.enable = true; syncthing = { enable = true; diff --git a/hosts/vps-monitor/default.nix b/hosts/vps-monitor/default.nix index b5d7e20..da28565 100644 --- a/hosts/vps-monitor/default.nix +++ b/hosts/vps-monitor/default.nix @@ -35,7 +35,6 @@ onlyCleanRoots = true; }; - nebula.enable = true; sshd.enable = true; dns.enable = true; }; diff --git a/hosts/vps-private/default.nix b/hosts/vps-private/default.nix index e28d821..c334679 100644 --- a/hosts/vps-private/default.nix +++ b/hosts/vps-private/default.nix @@ -39,7 +39,6 @@ onlyCleanRoots = true; }; - nebula.enable = true; sshd.enable = true; dns.enable = true; diff --git a/hosts/vps-public/default.nix b/hosts/vps-public/default.nix index 817658e..56e5fd9 100644 --- a/hosts/vps-public/default.nix +++ b/hosts/vps-public/default.nix @@ -38,7 +38,6 @@ onlyCleanRoots = true; }; - nebula.enable = true; sshd.enable = true; caddy.virtualHosts."dav.${sproutedDomain}" = { diff --git a/modules/system/networking/overlay.nix b/modules/system/networking/overlay.nix index 21acb84..df79c58 100644 --- a/modules/system/networking/overlay.nix +++ b/modules/system/networking/overlay.nix @@ -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"; + }; }; } diff --git a/modules/system/services/nebula/default.nix b/modules/system/services/nebula/default.nix index b37b9d7..6080052 100644 --- a/modules/system/services/nebula/default.nix +++ b/modules/system/services/nebula/default.nix @@ -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;