This commit is contained in:
parent
31417b97a7
commit
fda1e1845f
1 changed files with 3 additions and 17 deletions
|
|
@ -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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue