jail.nix/lib
Josh Heinrichs ff5dd74cbf Fix try-fwd-env setting unset variables
If an environment variable is unset, `try-fwd-env` will set it to an
empty string. This can cause issues for programs that treat unset and
empty environment variables differently. For instance, when jailing
Spotify with the `pulse` combinator, `$PULSE_SERVER` gets set to an
empty string, Spotify tries to use it as-is, fails, and then falls back
to using ALSA.

Ideally I would've liked to wire this into the existing env logic
somehow but it's a bit tricky to do since `--setenv` needs to be
provided to Bubblewrap conditionally based on a value that isn't known
until the script is executed. Bubblewrap appears to handle `--setenv`
being specified multiple times for the same variable okay, so not using
the existing env logic doesn't break the ability to override environment
variables.
2025-12-16 08:50:53 -08:00
..
combinators Fix try-fwd-env setting unset variables 2025-12-16 08:50:53 -08:00
base-permissions.nix Pull remaining default perms into base combinator 2025-10-10 16:28:45 -07:00
combinators.nix Add no-die-with-parent combinator 2025-12-16 08:50:53 -08:00
default.nix Format nix files with nixfmt-tree 2025-09-11 07:31:48 -07:00
helpers.nix Add pushState helper 2025-09-28 15:58:58 -07:00
jail.nix Add no-die-with-parent combinator 2025-12-16 08:50:53 -08:00