nameservers: Restructure modules

This commit is contained in:
SebastianStork 2026-03-02 01:49:08 +01:00
parent 1f2c921b81
commit 2b26c715f2
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
6 changed files with 10 additions and 10 deletions

View file

@ -21,7 +21,7 @@
};
services = {
nameservers.overlay.enable = true;
private-nameserver.enable = true;
syncthing = {
enable = true;

View file

@ -21,7 +21,7 @@
};
};
services.nameservers.public = {
services.public-nameserver = {
enable = true;
zones = [
"sprouted.cloud"

View file

@ -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);
};

View file

@ -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 = {

View file

@ -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;

View file

@ -58,7 +58,7 @@
};
};
services.nameservers.overlay.enable = true;
services.private-nameserver.enable = true;
};
};