diff options
| author | Alejandro Soto <alejandro@34project.org> | 2024-08-04 16:37:00 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2024-08-04 16:57:20 -0600 |
| commit | 9bc208cd34b2f015e205ccafba6f368091c1ad1a (patch) | |
| tree | 7007c98e6b28f322f2e58492557618d1a597a580 /sys/ns/ns.nix | |
| parent | c918238932f0d776666e552b8ccf353375703249 (diff) | |
sys/ns: add locally-managed NS records
Diffstat (limited to '')
| -rw-r--r-- | sys/ns/ns.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/ns/ns.nix b/sys/ns/ns.nix new file mode 100644 index 0000000..30a98d4 --- /dev/null +++ b/sys/ns/ns.nix @@ -0,0 +1,32 @@ +{ lib, ... }: +with lib; { + options.local.ns.zones = mkOption { + type = with lib.types; attrsOf (submodule ({ config, name, ... }: + let + cfg = config.localNS; + in + { + options.localNS = { + enable = mkEnableOption "local NS settings"; + + primary = mkOption { + type = str; + }; + }; + + config = mkIf cfg.enable { + ns = [ + { name = "@"; host = cfg.primary; } + ]; + + a = [ + { name = cfg.primary; ipv4 = "37.205.12.147"; } + ]; + + aaaa = [ + { name = cfg.primary; ipv6 = "2a03:3b40:fe:3ec::1"; } + ]; + }; + })); + }; +} |
