This remove the requirement on `which` binary when running any jail.
This was preventing jailed apps from running within nix sandbox without
manually specifying `pkgs.which` as a build input.
Instead of requiring the third argument to be a function that passes in
combinators, this exposes all combinators on `jail.combinators` and
allows the third argument to just be a list (or even null!). This may be
more ergonomic in some contexts (like nixpkgs overlays).
This isn't a breaking change, the third argument can still be a function
and will receive the combinators if it is.
By using `__functor` combinators can call each other directly by using
`rec` rather than needing to mapAttrs over all of the combinators to
inject them into each one.
This adds structured documentation and signatures to all combinators. A
future commit will consume this to generate a documentation website.
But for now having the docs in the source code is helpful to anyone
viewing `combinators.nix`.
* Use new data dir for persisted homes (~/.local/share/jail.nix/home
instead of ~/.local/share/jails)
* Rename `persisthome` -> `persist-home` (with deprecation warning when
using the old name)
* Generates a valid /etc/group for mounting in jails
* Updates data dir from ~/.local/share/jails to ~/.local/share/jail.nix
(persisthome will be updated to use the new datadir in the next commit)
* Fixes an error if data dir isn't created yet