nameservers/public: Add option publicHostName for use in the ns records

This commit is contained in:
SebastianStork 2026-03-04 00:37:20 +01:00
parent 3206c83d4b
commit 6a8f20960b
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q

View file

@ -40,7 +40,7 @@ let
|> lib.attrValues |> lib.attrValues
|> lib.filter (host: host.config.custom.services.public-nameserver.enable) |> lib.filter (host: host.config.custom.services.public-nameserver.enable)
|> lib.map (host: { |> lib.map (host: {
name = host.config.custom.networking.hostName; name = host.config.custom.services.public-nameserver.publicHostName;
inherit (host.config.custom.networking.underlay) address; inherit (host.config.custom.networking.underlay) address;
}); });
in in
@ -66,6 +66,10 @@ in
{ {
options.custom.services.public-nameserver = { options.custom.services.public-nameserver = {
enable = lib.mkEnableOption ""; enable = lib.mkEnableOption "";
publicHostName = lib.mkOption {
type = lib.types.nonEmptyStr;
default = netCfg.hostName;
};
port = lib.mkOption { port = lib.mkOption {
type = lib.types.port; type = lib.types.port;
default = 53; default = 53;