Commit graph

16 commits

Author SHA1 Message Date
Alex David
404e7da9da Add experimental overlay combinators 2026-04-14 22:27:44 -07:00
Alex David
42b355c38c Fix fwd-env "PATH" not working
Jail.nix does not expose `$PATH` by default because the automatic
runtime-closure binding often means your `$PATH` won't work anyway.

However, for some jails, you may want to disable the runtime-closure
binding and just bind your whole nix store. In those cases, it would be
nice if `fwd-env "PATH"` worked correctly.
2026-02-26 12:32:34 -08:00
Alex David
2ec4595d3b Fix broken example.org certificate test failures
At some point example.org changed something about their certificate
chain and causes `curl https://example.org` to fail on NixOS systems.

For now, I'm going to use `https://alexdav.id`.
2026-02-26 12:25:19 -08:00
Alex David
eaf7e343d8 Fix network combinator with systemd resolved 2025-12-16 08:50:53 -08:00
Alex David
2f8e84bf0a Backfill tests for fwd-env and try-fwd-env 2025-12-16 08:50:53 -08:00
Alex David
053e2c1364 Add no-die-with-parent combinator 2025-12-16 08:50:53 -08:00
Alex David
98a6bd032c Add reset combinator 2025-11-10 11:50:37 -08:00
Alex David
d596e0bc81 Fix time-zone combinator on missing /etc/localtime
Thanks ~charlie-collard for reporting this

Fixes https://todo.sr.ht/~alexdavid/jail.nix/2
2025-10-14 19:38:49 -07:00
Alex David
dffe5d150c Update readonly-paths-from-var test case
In 8fa6d132e1, ~mathiassven submitted a
patch that fixes the `readonly-paths-from-var` combinator omitting the
final path.

The tests didn't catch this since the final path in the test was a
non-existent path.

This commit backfills the test to catch regressions related to this bug.
The test now makes sure that the first, last, and at least one middle
test path are real paths that show up in the jail.
2025-10-10 16:45:13 -07:00
Alex David
e45e8a7ccb Only forward valid URLs in open-urls-in-browser
This is unlikely to be exploited since the combinator only allows a
single argument and is not parsed by any shell, but it seems like a good
thing to ensure that only valid non-local URLs will be forwarded to
$BROWSER.
2025-10-10 16:28:45 -07:00
Alex David
3ccf1d42e2 Add try-* bind combinators 2025-09-27 10:51:19 -07:00
Alex David
45c2b47d71 Fix time-zone combinator
Most software that wants to know the timezone reads the symlink in
`/etc/localtime`. A previous update broke this assumption when
attempting to fix the combinator to work on non-NixOS systems.

This change should fix the time-zone combinator in both NixOS and
non-NixOS systems.
2025-09-15 22:26:44 -07:00
Alex David
d35e9df391 Add open-urls-in-browser combinator 2025-09-01 21:47:48 -07:00
Alex David
f5cc61ef63 Add jail-to-host-channel combinator 2025-09-01 21:47:48 -07:00
Alex David
275a1296e7 Fix network combinator binding too many paths 2025-09-01 21:47:48 -07:00
Alex David
d8b14ca5ee Rewrite tests in haskell 2025-08-27 12:14:55 -07:00