From 66ef1fa38d908e3fadc770bbbc244243846461b1 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:04:41 +0000 Subject: [PATCH] move filebrowser to shared group and fix path issue --- modules/nixos/services/filebrowser.nix | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/modules/nixos/services/filebrowser.nix b/modules/nixos/services/filebrowser.nix index c02a2cc..8b3ba6c 100644 --- a/modules/nixos/services/filebrowser.nix +++ b/modules/nixos/services/filebrowser.nix @@ -5,12 +5,6 @@ ... }: let - user = - if config.services.nextcloud.enable then - config.services.phpfpm.pools.nextcloud.user - else - "filebrowser"; - dataDir = "/var/lib/filebrowser"; settings = { @@ -43,15 +37,15 @@ in startLimitBurst = 10; serviceConfig = { ExecStart = "${pkgs.filebrowser}/bin/filebrowser"; - DynamicUser = !config.services.nextcloud.enable; # Unique user if not using Nextcloud - User = user; - Group = user; + DynamicUser = true; + Group = "shared"; ReadWritePaths = [ dataDir ]; StateDirectory = [ "filebrowser" ]; Restart = "on-failure"; RestartPreventExitStatus = 1; RestartSec = "5s"; }; + path = [ pkgs.getent ]; # Fix: getent not found in $PATH }; caddy.routes = [