diff --git a/hosts/homeserver/default.nix b/hosts/homeserver/default.nix index e8ff995..12b1f8b 100644 --- a/hosts/homeserver/default.nix +++ b/hosts/homeserver/default.nix @@ -21,7 +21,7 @@ }; services = { - nameservers.overlay.enable = true; + private-nameserver.enable = true; syncthing = { enable = true; diff --git a/hosts/vps-public/default.nix b/hosts/vps-public/default.nix index 4991e42..c2bac90 100644 --- a/hosts/vps-public/default.nix +++ b/hosts/vps-public/default.nix @@ -21,7 +21,7 @@ }; }; - services.nameservers.public = { + services.public-nameserver = { enable = true; zones = [ "sprouted.cloud" diff --git a/modules/nixos/networking/overlay.nix b/modules/nixos/networking/overlay.nix index d67c7ed..3783352 100644 --- a/modules/nixos/networking/overlay.nix +++ b/modules/nixos/networking/overlay.nix @@ -63,7 +63,7 @@ in default = allHosts |> lib.attrValues - |> lib.filter (host: host.config.custom.services.nameservers.overlay.enable) + |> lib.filter (host: host.config.custom.services.private-nameserver.enable) |> lib.map (host: host.config.custom.networking.overlay.address); }; diff --git a/modules/nixos/services/nameservers/overlay.nix b/modules/nixos/services/nameservers/private.nix similarity index 89% rename from modules/nixos/services/nameservers/overlay.nix rename to modules/nixos/services/nameservers/private.nix index 54e9f32..b19982e 100644 --- a/modules/nixos/services/nameservers/overlay.nix +++ b/modules/nixos/services/nameservers/private.nix @@ -7,7 +7,7 @@ ... }: let - cfg = config.custom.services.nameservers.overlay; + cfg = config.custom.services.private-nameserver; netCfg = config.custom.networking; zoneData = inputs.dns.lib.toString netCfg.overlay.domain { @@ -20,7 +20,7 @@ let NS = allHosts |> lib.attrValues - |> lib.filter (host: host.config.custom.services.nameservers.overlay.enable) + |> lib.filter (host: host.config.custom.services.private-nameserver.enable) |> lib.map (host: "${host.config.custom.networking.overlay.fqdn}."); subdomains = @@ -58,7 +58,7 @@ let }; in { - options.custom.services.nameservers.overlay.enable = lib.mkEnableOption ""; + options.custom.services.private-nameserver.enable = lib.mkEnableOption ""; config = lib.mkIf cfg.enable { services = { diff --git a/modules/nixos/services/nameservers/public.nix b/modules/nixos/services/nameservers/public.nix index 2718038..79dbd6d 100644 --- a/modules/nixos/services/nameservers/public.nix +++ b/modules/nixos/services/nameservers/public.nix @@ -6,7 +6,7 @@ ... }: let - cfg = config.custom.services.nameservers.public; + cfg = config.custom.services.public-nameserver; netCfg = config.custom.networking; zoneData = @@ -38,7 +38,7 @@ let nsRecords = allHosts |> lib.attrValues - |> lib.filter (host: host.config.custom.services.nameservers.public.enable) + |> lib.filter (host: host.config.custom.services.public-nameserver.enable) |> lib.map (host: { name = host.config.custom.networking.hostName; inherit (host.config.custom.networking.underlay) address; @@ -64,7 +64,7 @@ let }; in { - options.custom.services.nameservers.public = { + options.custom.services.public-nameserver = { enable = lib.mkEnableOption ""; zones = lib.mkOption { type = lib.types.nonEmptyListOf lib.types.nonEmptyStr; diff --git a/tests/infrastructure/default.nix b/tests/infrastructure/default.nix index ee077bf..0838d71 100644 --- a/tests/infrastructure/default.nix +++ b/tests/infrastructure/default.nix @@ -58,7 +58,7 @@ }; }; - services.nameservers.overlay.enable = true; + services.private-nameserver.enable = true; }; };