mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-05-13 15:51:09 +02:00
dns update 2
This commit is contained in:
parent
2a8beaf5fc
commit
5f43998de8
1 changed files with 2 additions and 0 deletions
|
@ -38,6 +38,7 @@ let
|
|||
let
|
||||
getVirtualHosts = hostname: map (name: builtins.substring 0 (builtins.stringLength name - (builtins.stringLength domain + 1)) name) (builtins.attrNames self.nixosConfigurations."${hostname}".config.services.caddy.virtualHosts);
|
||||
genCNAMEs = hostname: lib.attrsets.genAttrs (getVirtualHosts hostname) (_label: { CNAME = [ "${hostname}.${domain}." ]; });
|
||||
genACMECNAMEs = hostname: lib.attrsets.genAttrs (getVirtualHosts hostname) (_label: { subdomains._acme-challenge.CNAME = [ "challenge.acme.${domain}." ]; });
|
||||
in
|
||||
lib.attrsets.mergeAttrsList [
|
||||
rec {
|
||||
|
@ -58,6 +59,7 @@ let
|
|||
"*".subdomains."_acme-challenge".CNAME = [ "challenge.acme.rfive.de" ];
|
||||
}
|
||||
(builtins.removeAttrs (genCNAMEs "nuc") ([ ":2018" ] ++ (builtins.filter (host: lib.strings.hasInfix "vpn" host) (getVirtualHosts "nuc"))))
|
||||
(builtins.removeAttrs (genACMECNAMEs "nuc") ([ ":2018" ]))
|
||||
(builtins.removeAttrs (genCNAMEs "falkenstein") [ "mail" ":2018" ])
|
||||
];
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue