This commit is contained in:
parent
31417b97a7
commit
fda1e1845f
1 changed files with 3 additions and 17 deletions
|
|
@ -1,9 +1,4 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
{config, ...}: let
|
||||
mailDomain = config.customOps.domain;
|
||||
in {
|
||||
sops.secrets = {
|
||||
|
|
@ -76,21 +71,12 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
services.radicale = let
|
||||
mailAccounts = config.mailserver.loginAccounts;
|
||||
htpasswd = pkgs.writeText "radicale.users" (
|
||||
lib.concatStrings
|
||||
(lib.flip lib.mapAttrsToList mailAccounts (
|
||||
mail: user:
|
||||
mail + ":" + user.hashedPassword + "\n"
|
||||
))
|
||||
);
|
||||
in {
|
||||
services.radicale = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auth = {
|
||||
type = "htpasswd";
|
||||
htpasswd_filename = "${htpasswd}";
|
||||
htpasswd_filename = "/run/secrets/mailserver";
|
||||
htpasswd_encryption = "bcrypt";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue