radicale: using hashedPasswordFile
Some checks failed
/ deploy (push) Failing after 18s

This commit is contained in:
toufic ar 2026-01-28 19:12:04 +02:00
parent 31417b97a7
commit fda1e1845f
Signed by: toufic ar
SSH key fingerprint: SHA256:/NaO5I1nG3gYKzrzSiTYIdRyaIYxDWfr1U+d+yfJ/4k

View file

@ -1,9 +1,4 @@
{ {config, ...}: let
config,
lib,
pkgs,
...
}: let
mailDomain = config.customOps.domain; mailDomain = config.customOps.domain;
in { in {
sops.secrets = { sops.secrets = {
@ -76,21 +71,12 @@ in {
''; '';
}; };
services.radicale = let services.radicale = {
mailAccounts = config.mailserver.loginAccounts;
htpasswd = pkgs.writeText "radicale.users" (
lib.concatStrings
(lib.flip lib.mapAttrsToList mailAccounts (
mail: user:
mail + ":" + user.hashedPassword + "\n"
))
);
in {
enable = true; enable = true;
settings = { settings = {
auth = { auth = {
type = "htpasswd"; type = "htpasswd";
htpasswd_filename = "${htpasswd}"; htpasswd_filename = "/run/secrets/mailserver";
htpasswd_encryption = "bcrypt"; htpasswd_encryption = "bcrypt";
}; };
}; };