diff --git a/modules/records.nix b/modules/records.nix index 31732a7..41da216 100644 --- a/modules/records.nix +++ b/modules/records.nix @@ -299,8 +299,8 @@ lib.mapAttrs description = lib.mdDoc '' The canonical hostname of the machine providing the service. ''; - example = "ftp://example.com/public"; - type = lib.types.int; + example = "example.com"; + type = lib.types.str; # change str to lib.types.domain once it exists; apply = x: "${x}."; }; }; diff --git a/utils/tests/debug.nix b/utils/tests/debug.nix index b0e6c57..ad2eb31 100644 --- a/utils/tests/debug.nix +++ b/utils/tests/debug.nix @@ -46,6 +46,9 @@ in "example.org" = { cname = { data = [ "www.example.com" ]; ttl = 60; }; }; + "_xmpp._tcp.example.org" = { + srv = { data = [{ port = 5223; priority = 10; weight = 5; target = "host1.example.com."; }]; ttl = 60; }; + }; }; }; }; diff --git a/utils/tests/domains.nix b/utils/tests/domains.nix index 832a5e6..1782503 100644 --- a/utils/tests/domains.nix +++ b/utils/tests/domains.nix @@ -128,6 +128,9 @@ "example.org" = { cname = { data = [ "www.example.com" ]; ttl = 60; }; }; + "_xmpp._tcp.example.org" = { + srv = { data = [{ port = 5223; priority = 10; weight = 5; target = "host1.example.com."; }]; ttl = 60; }; + }; }; }; }; diff --git a/utils/tests/resources/dnsConfig.nix b/utils/tests/resources/dnsConfig.nix index 9e63320..0bc1dc5 100644 --- a/utils/tests/resources/dnsConfig.nix +++ b/utils/tests/resources/dnsConfig.nix @@ -19,6 +19,14 @@ in "" = { cname.data = "www.example.com"; }; + "_xmpp._tcp" = { + srv.data = { + priority = 10; + weight = 5; + port = 5223; + target = "host1.example.com"; + }; + }; }; }; };