nixos-config/config/zones/selby.ca.nix

39 lines
834 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
fudo = config.fudo.zones."fudo.org";
getIfAttrs = attrs: attrmap: let
has-attr = attr: hasAttr attr attrmap;
in getAttrs (filter has-attr attrs) attrmap;
in {
config = {
fudo.zones."selby.ca" = {
srv-records = let
# Mail records will be created, no need to copy
shared-tcp-attrs =
["domain"
"kerberos"
"kerberos-adm"
"ldap"
"ldaps"
"minecraft"
"xmpp-client"
"xmpp-server"];
shared-udp-attrs =
[
"kerberos"
"kerberos-master"
"kpasswd"
];
in {
tcp = getIfAttrs shared-tcp-attrs fudo.srv-records.tcp;
udp = getIfAttrs shared-udp-attrs fudo.srv-records.udp;
};
};
};
}