feat: add radicle to bekkalokk

This commit is contained in:
Adrian G L
2026-05-31 02:04:30 +02:00
parent e05eab4ddf
commit 1eb6486baa
2 changed files with 44 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
./services/alps.nix ./services/alps.nix
./services/bluemap.nix ./services/bluemap.nix
./services/radicle.nix
./services/idp-simplesamlphp ./services/idp-simplesamlphp
./services/kerberos.nix ./services/kerberos.nix
./services/mediawiki ./services/mediawiki

View File

@@ -0,0 +1,43 @@
{ config, lib, ... }:
let
domain = "dav.pvv.ntnu.no";
radicalePort = 5232;
in {
services.radicale = {
enable = true;
settings = {
server = {
hosts = [ "127.0.0.1:${toString radicalePort}" ];
};
auth = {
type = "imap";
imap_host = "imap.pvv.ntnu.no";
imap_security = "tls";
};
storage = {
filesystem_folder = "/var/lib/radicale/collections";
};
};
};
services.nginx.virtualHosts."${domain}" = {
forceSSL = true;
enableACME = true;
kTLS = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString radicalePort}";
extraConfig = ''
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_pass_header Authorization;
'';
};
};
networking.firewall.allowedTCPPorts = [ radicalePort ];
}