Commit
This commit is contained in:
37
modules/services/radicale.nix
Normal file
37
modules/services/radicale.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
lux.services._.radicale = den.lib.exactly {
|
||||
includes = [
|
||||
(
|
||||
{ host, ... }:
|
||||
{
|
||||
nixos =
|
||||
{ config, ... }:
|
||||
{
|
||||
services.radicale = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server.hosts = [ "127.0.0.1:5232" ];
|
||||
|
||||
auth = {
|
||||
type = "htpasswd";
|
||||
htpasswd_filename = config.sops.secrets.radicale-users.path;
|
||||
htpasswd_encryption = "bcrypt";
|
||||
};
|
||||
|
||||
storage.filesystem_folder = "/var/lib/radicale/collections";
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."radicale.${host.domain}".extraConfig = ''
|
||||
reverse_proxy :5232 {
|
||||
header_up X-Script-Name /
|
||||
header_up X-Forwarded-For {remote}
|
||||
header_up X-Remote-User {http.auth.user.id}
|
||||
}'';
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user