move filebrowser to shared group and fix path issue

This commit is contained in:
Noah Masur 2024-12-09 15:04:41 +00:00
parent 30cc02c2a7
commit 66ef1fa38d
No known key found for this signature in database

View File

@ -5,12 +5,6 @@
... ...
}: }:
let let
user =
if config.services.nextcloud.enable then
config.services.phpfpm.pools.nextcloud.user
else
"filebrowser";
dataDir = "/var/lib/filebrowser"; dataDir = "/var/lib/filebrowser";
settings = { settings = {
@ -43,15 +37,15 @@ in
startLimitBurst = 10; startLimitBurst = 10;
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.filebrowser}/bin/filebrowser"; ExecStart = "${pkgs.filebrowser}/bin/filebrowser";
DynamicUser = !config.services.nextcloud.enable; # Unique user if not using Nextcloud DynamicUser = true;
User = user; Group = "shared";
Group = user;
ReadWritePaths = [ dataDir ]; ReadWritePaths = [ dataDir ];
StateDirectory = [ "filebrowser" ]; StateDirectory = [ "filebrowser" ];
Restart = "on-failure"; Restart = "on-failure";
RestartPreventExitStatus = 1; RestartPreventExitStatus = 1;
RestartSec = "5s"; RestartSec = "5s";
}; };
path = [ pkgs.getent ]; # Fix: getent not found in $PATH
}; };
caddy.routes = [ caddy.routes = [