discovery-scope

This commit is contained in:
2026-04-14 15:24:12 +02:00
parent 3630b9583b
commit fc6a5e6c29
2 changed files with 18 additions and 7 deletions
@@ -5,6 +5,8 @@
...
}:
let
radicaleHostFor = domain: "cal.${domain}";
mkThunderbirdAutoconfig = domain:
pkgs.writeText "autoconfig-${domain}.xml" ''
<?xml version="1.0" encoding="UTF-8"?>
@@ -29,6 +31,18 @@ let
<username>%EMAILADDRESS%</username>
<authentication>password-cleartext</authentication>
</outgoingServer>
<addressBook type="carddav">
<username>%EMAILADDRESS%</username>
<authentication>http-basic</authentication>
<serverURL>https://${radicaleHostFor domain}/</serverURL>
</addressBook>
<calendar type="caldav">
<username>%EMAILADDRESS%</username>
<authentication>http-basic</authentication>
<serverURL>https://${radicaleHostFor domain}/</serverURL>
</calendar>
</emailProvider>
</clientConfig>
'';
+2 -5
View File
@@ -13,13 +13,10 @@ lib.mkIf hasMailDiscoveryConfig (
domain = builtins.head cfg.domains;
radicaleHost = "cal.${domain}";
mailAccounts = cfg.loginAccounts;
discoveryHosts = lib.unique (
cfg.domains
++ [
discoveryHosts = lib.unique [
cfg.fqdn
radicaleHost
]
);
];
accountHash =
mail: account: