Passing environment variables to post-build-hook when using multi-user setup

At work we recently switched to multi-user setup for our builds on CI, however now the environment variables set by the current user won’t be available for the script configured in the post-build-hook. I’m guessing either the nix-daemon or the build user itself executes the post-build-hook. Is there a way to provide environment variables to the post-build-hook from the user triggering the nix-build?

1 Like
Hosted by Flying Circus.