summaryrefslogtreecommitdiff
path: root/sys/ns
diff options
context:
space:
mode:
Diffstat (limited to 'sys/ns')
-rw-r--r--sys/ns/ns.nix5
-rw-r--r--sys/ns/rr.nix7
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/ns/ns.nix b/sys/ns/ns.nix
index f23fccf..4c242b6 100644
--- a/sys/ns/ns.nix
+++ b/sys/ns/ns.nix
@@ -1,6 +1,7 @@
{ config, lib, ... }:
with lib; let
inherit (config.local.ns.server) tsigName;
+ inherit (config.local.nets) gate-public;
in
{
options.local.ns.zones = mkOption {
@@ -41,11 +42,11 @@ in
];
a = [
- { name = cfg.primary; ipv4 = "37.205.12.147"; }
+ { name = cfg.primary; ipv4 = gate-public.hosts.gate.v4.address; }
];
aaaa = [
- { name = cfg.primary; ipv6 = "2a03:3b40:fe:3ec::1"; }
+ { name = cfg.primary; ipv6 = gate-public.hosts.gate.v6.address; }
];
};
}));
diff --git a/sys/ns/rr.nix b/sys/ns/rr.nix
index a007c4a..a80eaf4 100644
--- a/sys/ns/rr.nix
+++ b/sys/ns/rr.nix
@@ -1,6 +1,7 @@
{ config, lib, options, pkgs, ... }:
with lib; let
cfg = config.local.ns;
+ globalConfig = config;
segmentRegex = "[a-z0-9_-]+(\\.[a-z0-9_-]+)*";
@@ -78,6 +79,12 @@ in
in
{
options = {
+ local = mkOption {
+ type = unspecified;
+ default = globalConfig.local;
+ readOnly = true;
+ };
+
defaultTTL = mkOption {
type = int;
default = 3600;