diff --git a/applications/dns.nix b/applications/dns.nix index 4a5e9ff..98f7ca9 100644 --- a/applications/dns.nix +++ b/applications/dns.nix @@ -18,6 +18,7 @@ let sort_records_a = builtins.sort (a: b: (ip_ptr_to_int a.value) < (ip_ptr_to_int b.value)) filter_records_a; sort_records_cname = builtins.sort (a: b: a.value < b.value) (filter_records_type "CNAME"); sort_records_ptr = builtins.sort (a: b: (lib.strings.toInt a.record) < (lib.strings.toInt b.record)) (process_ptr (filter_records_type "PTR")); + sort_records_srv = builtins.sort (a: b: a.record < b.record) (filter_records_type "SRV"); format_records = records: offset: lib.strings.concatMapStrings (x: "${padString x.record offset} IN ${padString x.r_type 5} ${x.value}\n") records; @@ -83,7 +84,7 @@ ${format_records (filter_records_type "TXT") 29} ; ------------------------------------------ ; SRV ; ------------------------------------------ -${format_records (filter_records_type "SRV") 29} +${format_records sort_records_srv 29} ''