more server stuff

This commit is contained in:
Till 2025-04-27 18:29:51 +02:00
parent 0d08c32077
commit bc5f851d3f
5 changed files with 63 additions and 11 deletions

View file

@ -0,0 +1,34 @@
{ config, pkgs, ... }:
{
services.nginx.virtualHosts."kalender.ktiu.net" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:5232/";
extraConfig = ''
proxy_set_header X-Script-Name /;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Authorization;
'';
};
};
services.radicale = {
enable = true;
settings = {
server = {
hosts = [ "0.0.0.0:5232" "[::]:5232" ];
};
auth = {
type = "htpasswd";
htpasswd_filename = "/etc/radicale/users";
htpasswd_encryption = "bcrypt";
};
storage = {
filesystem_folder = "/var/lib/radicale/collections";
};
};
};
}