nix-config/configs/nixos/radicale.nix

30 lines
601 B
Nix
Raw Normal View History

2024-07-25 22:24:11 +02:00
{
inputs,
config,
pkgs,
lib,
...
}: {
services.radicale = lib.mkIf (lib.hasAttrByPath ["sops" "secrets" "radicale-users"] config) {
2024-07-29 22:02:40 +02:00
enable = true;
settings = {
auth = {
type = "htpasswd";
htpasswd_encryption = "md5";
2024-08-07 22:24:17 +02:00
htpasswd_filename = config.sops.secrets.radicale-users.path;
2024-07-25 22:24:11 +02:00
};
};
};
networking.firewall.allowedTCPPorts = [5232];
2024-07-29 22:02:40 +02:00
services.nginx.virtualHosts."cal.venberg.xyz" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:5232";
};
};
2024-07-30 22:25:53 +02:00
imports = [./nginx.nix];
2024-07-25 22:24:11 +02:00
}