niksos/hosts/chmura/seafile.nix

46 lines
1.2 KiB
Nix
Raw Normal View History

2023-07-16 10:34:12 +02:00
{
config,
inputs,
pkgs,
...
}: {
services.seafile = {
enable = true;
adminEmail = "jacekpoz@cock.li";
initialAdminPassword = "";
2023-07-16 10:40:23 +02:00
ccnetSettings.General.SERVICE_URL = "https://f.jacekpoz.pl";
2023-07-16 10:34:12 +02:00
seafileSettings = {
fileserver = {
host = "0.0.0.0";
port = 8082;
max_download_dir_size = 10000;
};
general.enable_syslog = true;
};
};
systemd.services.seafileGC = {
startAt = "*-*-* 04:00:00";
script = ''
echo Stopping seafile server
systemctl stop seahub.service
systemctl stop seaf-server.service
echo Server stopped, starting GC
${pkgs.seafile-server}/bin/seafserv-gc -F /etc/seafile/ -d /var/lib/seafile/data/ -c /var/lib/seafile/data/
echo GC completed, starting server
systemctl start seaf-server.service
systemctl start seahub.service
echo Server started
'';
};
services.caddy = {
enable = true;
2023-07-16 10:40:23 +02:00
virtualHosts."f.jacekpoz.pl".extraConfig = ''
reverse_proxy * localhost:8082
2023-07-16 10:34:12 +02:00
'';
};
}