diff options
author | azahi <azat@bahawi.net> | 2024-12-17 02:04:27 +0300 |
---|---|---|
committer | azahi <azat@bahawi.net> | 2024-12-17 02:04:27 +0300 |
commit | 1ae038a0a86348074b422ea87c03836b0962af67 (patch) | |
tree | ae56c73c01b4777e3e24a22c2d67943706997cf0 /modules/unbound.nix | |
parent | 2024-12-02 (diff) |
Diffstat (limited to 'modules/unbound.nix')
-rw-r--r-- | modules/unbound.nix | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/modules/unbound.nix b/modules/unbound.nix index e837f89..b8de321 100644 --- a/modules/unbound.nix +++ b/modules/unbound.nix @@ -65,10 +65,12 @@ in "\"${domain}. A ${ipv4.address}\"" "\"${domain}. AAAA ${ipv6.address}\"" ] - ++ concatMap (domain: [ - "\"${domain}. A ${ipv4.address}\"" - "\"${domain}. AAAA ${ipv6.address}\"" - ]) attr.domains + ++ (optionals (hasAttr "domains" attr) ( + concatMap (domain: [ + "\"${domain}. A ${ipv4.address}\"" + "\"${domain}. AAAA ${ipv6.address}\"" + ]) attr.domains + )) )) ) my.configurations ); @@ -85,10 +87,12 @@ in "\"${ipv4.address} ${domain}\"" "\"${ipv6.address} ${domain}\"" ] - ++ concatMap (domain: [ - "\"${ipv4.address} ${domain}\"" - "\"${ipv6.address} ${domain}\"" - ]) attr.domains + ++ (optionals (hasAttr "domains" attr) ( + concatMap (domain: [ + "\"${ipv4.address} ${domain}\"" + "\"${ipv6.address} ${domain}\"" + ]) attr.domains + )) )) ) my.configurations ); |