Compare commits

..

2 Commits

Author SHA1 Message Date
Noah Masur
05deb5b979 fix paperless permissions with umask
instead of running a systemd service timer
2024-02-10 01:40:04 +00:00
Noah Masur
8621e2375d fix: nextcloud extraOptions renamed 2024-02-10 01:37:21 +00:00
3 changed files with 7 additions and 18 deletions

View File

@ -80,7 +80,7 @@ in {
};
# Allows Nextcloud to trust Cloudflare IPs
services.nextcloud.extraOptions.trusted_proxies = cloudflareIpRanges;
services.nextcloud.settings.trusted_proxies = cloudflareIpRanges;
};
}

View File

@ -14,7 +14,7 @@
adminpassFile = config.secrets.nextcloud.dest;
dbtype = "mysql";
};
extraOptions = {
settings = {
default_phone_region = "US";
# Allow access when hitting either of these hosts or IPs
trusted_domains = [ config.hostnames.content ];

View File

@ -48,23 +48,12 @@
before = [ "paperless.service" ];
};
# Fix permissions on a regular schedule
systemd.timers.paperless-permissions = {
timerConfig = {
OnCalendar = "*-*-* *:0/5"; # Every 5 minutes
Unit = "paperless-permissions.service";
};
wantedBy = [ "timers.target" ];
};
# Fix paperless shared permissions
systemd.services.paperless-permissions = {
description = "Allow group access to paperless files";
serviceConfig = { Type = "oneshot"; };
script = ''
find ${config.services.paperless.mediaDir} -type f -exec chmod 640 -- {} +
'';
};
systemd.services.paperless-web.serviceConfig.UMask = lib.mkForce "0026";
systemd.services.paperless-scheduler.serviceConfig.UMask =
lib.mkForce "0026";
systemd.services.paperless-task-queue.serviceConfig.UMask =
lib.mkForce "0026";
};