mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 18:59:07 +01:00
nameservers: Restructure modules
This commit is contained in:
parent
1f2c921b81
commit
2b26c715f2
6 changed files with 10 additions and 10 deletions
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue