This commit is contained in:
Lennart J. Kurzweg (Nx2)
2025-01-02 21:44:15 +01:00
parent 57230a32c3
commit 34eba60193
4 changed files with 25 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
{ pkgs, inputs, lib, host, ... }:
{ pkgs, inputs, host, ... }:
{
imports = ([
inputs.sops-nix.nixosModules.sops
@@ -43,6 +43,7 @@
./system-modules/postgres.nix
./system-modules/nx2site/proxy.nix
./system-modules/nx2site/gitea.nix
./system-modules/nx2site/radicale.nix
# ./system-modules/nx2site/nextcloud.nix
./system-modules/nx2site/vaultwarden.nix
./system-modules/nx2site/paperless.nix

View File

@@ -136,6 +136,10 @@
listen = dl;
locations = { "/" = { proxyPass = "http://127.0.0.1:8441"; }; };
};
"dav.${domain}" = lib.mkIf config.services.radicale.enable (vh // {
listen = dl;
locations = { "/" = { proxyPass = "http://127.0.0.1:5232"; }; };
});
"nc.${domain}" = vh // {
# directly to nc
};

View File

@@ -1,14 +1,23 @@
{ config, domain, ... }:
{
sops.secrets = {
"nx2site/radicale-htpasswd" = {};
"nx2site/radicale-htpasswd" = {
owner = "radicale";
};
};
services = {
radicale = {
# is run by user radicale
enable = true;
settings = {
server.hosts = let
port = builtins.toString 5232;
in [ "192.168.178.32:${port}" ];
in [
"0.0.0.0:${port}"
"${domain}:${port}"
# "192.168.178.32:${port}"
];
auth = {
type = "htpasswd";
htpasswd_filename = config.sops.secrets."nx2site/radicale-htpasswd".path;
@@ -16,4 +25,5 @@
};
};
};
};
}

View File

@@ -20,6 +20,7 @@
"nginx"
"adbusers"
"postgres"
"radicale"
"nextcloud"
];
useDefaultShell = true;