From 062417719bd97c86d1bd58be94f526541337201d Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sun, 7 Jan 2024 05:47:33 -0600 Subject: [PATCH] adding better nextcloud tweaks --- systems/dalinar/configuration.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/systems/dalinar/configuration.nix b/systems/dalinar/configuration.nix index 9d7ca46..5628d11 100644 --- a/systems/dalinar/configuration.nix +++ b/systems/dalinar/configuration.nix @@ -389,12 +389,14 @@ encode gzip redir /.well-known/carddav /remote.php/dav 301 redir /.well-known/caldav /remote.php/dav 301 - header Strict-Transport-Security "max-age=15768000; includeSubDomains; reload;" + header { Strict-Transport-Security "max-age=15768000; includeSubDomains; reload;" Access-Control-Allow-Origin * Referrer-Policy no-referrer-when-downgrade } ''; }; }; systemd.services = { +nextcloud-cron = { enable = true; serviceConfig = { Type = "oneshot"; ExecStart = "${pkgs.docker}/bin/docker exec -u www-data -d nextcloud-app-1 php cron.php"; }; }; +nextcloud-previews = { enable = true; serviceConfig = { Type = "oneshot"; ExecStart = "${pkgs.docker}/bin/docker exec -u www-data -d nextcloud-app-1 php occ preview:pre-generate"; }; }; # mail-cert-renew = { # enable = true; # serviceConfig = { @@ -404,6 +406,11 @@ # }; }; + systemd.timers = { +nextcloud-cron = { enable = true; partOf = ["nextcloud-cron.service"]; timerConfig = { OnStartupSec = "2min"; OnUnitActiveSec = "5min"; Unit = "nextcloud-cron.service"; }; wantedBy = [ "timers.target" ]; }; nextcloud-previews = { enable = true; partOf = ["nextcloud-previews.service"]; timerConfig = { OnStartupSec = "2min"; OnUnitActiveSec = "10min"; + Unit = "nextcloud-previews.service"; }; wantedBy = [ "timers.target" ]; }; + }; + # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];