Home: Add davis.

This commit is contained in:
Dmitry Voronin 2025-01-09 14:09:03 +03:00
parent 5ec2dca439
commit af86a390fa
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
3 changed files with 38 additions and 0 deletions

View file

@ -5,6 +5,7 @@ let
binds = [ binds = [
(mkBind "change" "/var/lib/changedetection-io") (mkBind "change" "/var/lib/changedetection-io")
(mkBind "cups" "/var/lib/cups") (mkBind "cups" "/var/lib/cups")
(mkBind "davis" "/var/lib/davis")
(mkBind "deluge" "/var/lib/deluge/.config/deluge") (mkBind "deluge" "/var/lib/deluge/.config/deluge")
(mkBind "dkim" "/var/dkim") (mkBind "dkim" "/var/dkim")
(mkBind "dovecot_index" "/var/lib/dovecot/indices") (mkBind "dovecot_index" "/var/lib/dovecot/indices")

View file

@ -0,0 +1,20 @@
{ ... }:
let
storage = "/storage/hot/data/davis"; # TODO: Move to config.
in
{
services.davis = {
enable = true;
adminPasswordFile = "${storage}/Password";
appSecretFile = "${storage}/Secret";
hostname = "dav.voronind.com";
nginx = {
sslCertificate = "/etc/letsencrypt/live/voronind.com/fullchain.pem";
sslCertificateKey = "/etc/letsencrypt/live/voronind.com/privkey.pem";
};
mail = {
dsnFile = "${storage}/Dsn";
inviteFromAddress = "noreply@voronind.com";
};
};
}

View file

@ -0,0 +1,17 @@
{ lib, ... }:
{
"dav.voronind.com" = {
sslCertificate = "/etc/letsencrypt/live/voronind.com/fullchain.pem";
sslCertificateKey = "/etc/letsencrypt/live/voronind.com/privkey.pem";
onlySSL = lib.mkForce true;
locations."/".extraConfig = ''
allow 10.0.0.0/8;
allow fd09:8d46:b26::/48;
deny all;
'';
extraConfig = ''
include /etc/letsencrypt/conf/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/conf/ssl-dhparams.pem;
'';
};
}