nixfiles/hosts/hetzner-arm/profiles/radicale.nix

41 lines
917 B
Nix
Raw Normal View History

{config, ...}: let
2024-03-10 17:26:18 +00:00
inherit (config.services.secrets) secrets;
in {
services.radicale = {
enable = true;
settings = {
server = {
2024-07-20 13:23:50 +01:00
hosts = ["127.0.0.1:5232"];
};
auth = {
type = "htpasswd";
htpasswd_filename = "${secrets.radicale_htpasswd.path}";
htpasswd_encryption = "bcrypt";
};
rights = {
type = "owner_only";
};
storage = {
filesystem_folder = "/var/lib/radicale/collections";
};
};
};
systemd.tmpfiles.rules = [
"d /var/lib/radicale - radicale radicale"
"d /var/lib/radicale/collections - radicale radicale"
];
2024-07-20 13:23:50 +01:00
2024-07-20 13:25:35 +01:00
users.users.radicale.uid = 1002;
users.groups.radicale.gid = 1002;
2024-07-20 13:23:50 +01:00
services.nginx = {
enable = true;
virtualHosts."radicale.owo.monster" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:5232";
};
};
}