mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
nixos/tandoor-recipes: improve manage script
This is shamelessly stolen from Photoprism's module, and should allow executing the manage script without resorting to various tricks due to relying on transient users.
This commit is contained in:
parent
6b1e9f77f9
commit
af6e257878
@ -20,7 +20,10 @@ let
|
||||
manage = pkgs.writeShellScript "manage" ''
|
||||
set -o allexport # Export the following env vars
|
||||
${lib.toShellVars env}
|
||||
exec ${pkg}/bin/tandoor-recipes "$@"
|
||||
eval "$(${config.systemd.package}/bin/systemctl show -pUID,GID,MainPID tandoor-recipes.service)"
|
||||
exec ${pkgs.util-linux}/bin/nsenter \
|
||||
-t $MainPID -m -S $UID -G $GID \
|
||||
${pkg}/bin/tandoor-recipes "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user