discovery-scope
This commit is contained in:
@@ -5,6 +5,8 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
radicaleHostFor = domain: "cal.${domain}";
|
||||||
|
|
||||||
mkThunderbirdAutoconfig = domain:
|
mkThunderbirdAutoconfig = domain:
|
||||||
pkgs.writeText "autoconfig-${domain}.xml" ''
|
pkgs.writeText "autoconfig-${domain}.xml" ''
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
@@ -29,6 +31,18 @@ let
|
|||||||
<username>%EMAILADDRESS%</username>
|
<username>%EMAILADDRESS%</username>
|
||||||
<authentication>password-cleartext</authentication>
|
<authentication>password-cleartext</authentication>
|
||||||
</outgoingServer>
|
</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>
|
</emailProvider>
|
||||||
</clientConfig>
|
</clientConfig>
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -13,13 +13,10 @@ lib.mkIf hasMailDiscoveryConfig (
|
|||||||
domain = builtins.head cfg.domains;
|
domain = builtins.head cfg.domains;
|
||||||
radicaleHost = "cal.${domain}";
|
radicaleHost = "cal.${domain}";
|
||||||
mailAccounts = cfg.loginAccounts;
|
mailAccounts = cfg.loginAccounts;
|
||||||
discoveryHosts = lib.unique (
|
discoveryHosts = lib.unique [
|
||||||
cfg.domains
|
|
||||||
++ [
|
|
||||||
cfg.fqdn
|
cfg.fqdn
|
||||||
radicaleHost
|
radicaleHost
|
||||||
]
|
];
|
||||||
);
|
|
||||||
|
|
||||||
accountHash =
|
accountHash =
|
||||||
mail: account:
|
mail: account:
|
||||||
|
|||||||
Reference in New Issue
Block a user