1
0
Fork 0
NixOS/hosts/greatyamada/services/radicale.nix
2024-06-28 18:15:13 +02:00

28 lines
723 B
Nix

{ ... }:
let
radicalePath = "/mnt/Datos/radicale";
nginxLocalServiceConfig = import ./nginx-local-config.nix;
in {
services = {
radicale = {
enable = true;
settings = {
server.hosts = [ "127.0.0.1:5232" ];
auth = {
type = "htpasswd";
htpasswd_filename = "/etc/radicale/users";
htpasswd_encryption = "bcrypt";
};
storage.filesystem_folder = radicalePath;
};
};
nginx.virtualHosts."radicale.rcia.dev" = {
locations."/" = { proxyPass = "http://127.0.0.1:5232"; };
extraConfig = nginxLocalServiceConfig;
};
};
sops.secrets."radicale/users" = {
path = "/etc/radicale/users";
owner = "radicale";
};
}