diff options
author | Felix Bühler <Stunkymonkey@users.noreply.github.com> | 2024-03-24 17:06:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-24 17:06:01 +0100 |
commit | 63078e346817f586c3d3b791822d5a756725ccb8 (patch) | |
tree | ba131249784adfd44a70aa7e0d05461ae44f2550 /nixos | |
parent | a9a3ea33b666758058d001edcc809b9a2bb3ff44 (diff) | |
parent | af6e25787827e25a87bb874362ad380a2cfab199 (diff) |
Merge pull request #298168 from ambroisie/improve-tandoor-recipes-manage
nixos/tandoor-recipes: improve manage script
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/tandoor-recipes.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/tandoor-recipes.nix b/nixos/modules/services/misc/tandoor-recipes.nix index a8300ecd52337..1b1fde78ad0a5 100644 --- a/nixos/modules/services/misc/tandoor-recipes.nix +++ b/nixos/modules/services/misc/tandoor-recipes.nix @@ -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 { @@ -82,6 +85,7 @@ in Restart = "on-failure"; User = "tandoor_recipes"; + Group = "tandoor_recipes"; DynamicUser = true; StateDirectory = "tandoor-recipes"; WorkingDirectory = "/var/lib/tandoor-recipes"; |