nixos-config/mastus/radicale.nix

43 lines
880 B
Nix
Raw Normal View History

2016-06-18 09:18:36 +02:00
{ config, pkgs, ... }:
let
radicalePort = 8002;
in
{
services.radicale = {
enable = true;
2019-08-26 18:06:21 +02:00
package = pkgs.radicale2;
2016-06-18 09:18:36 +02:00
config = ''
[server]
hosts = 127.0.0.1:${toString radicalePort}
ssl = false
dns_lookup = false
[storage]
2019-08-26 18:06:21 +02:00
filesystem_folder = /var/lib/radicale/collections
2016-06-18 09:18:36 +02:00
[auth]
2019-08-26 18:06:21 +02:00
type = htpasswd
htpasswd_filename = /var/lib/radicale/htpasswd
2016-06-18 09:18:36 +02:00
[rights]
type = owner_only
'';
};
2020-10-30 19:06:17 +01:00
security.acme.certs."gebner.org".extraDomainNames = [ "radicale.gebner.org" ];
2016-06-18 09:18:36 +02:00
2019-08-25 18:04:33 +02:00
services.nginx = {
recommendedProxySettings = true;
virtualHosts."radicale.gebner.org" = {
forceSSL = true;
useACMEHost = "gebner.org";
locations."/" = {
proxyPass = "http://127.0.0.1:${toString radicalePort}";
};
};
};
2016-06-18 09:18:36 +02:00
2019-08-26 18:06:21 +02:00
environment.systemPackages = with pkgs; [ apacheHttpd ];
2016-06-18 09:18:36 +02:00
}