Pull remaining default perms into base combinator

`base-permissions.nix` was the source of truth for all of the base
combinators, but it was not documented well anywhere.

To make this easier and more obvious for users, this commit pulls all
remaining custom permissions into a new `base` combinator which is
included by default. This way there is no more undocumented permissions
included by default, they are all documented in the `Default included
combinators` section of the docs.

This should also make it easier to override base permissions because
users can now just specify `base` instead of all of the
`unsafe-add-raw-args` calls unless they really want to change them.
This commit is contained in:
Alex David 2025-10-04 15:10:08 -07:00
commit b0a8a22983
4 changed files with 70 additions and 23 deletions

View file

@ -1,15 +1,5 @@
pkgs: combinators: with combinators; [
(unsafe-add-raw-args "--proc /proc")
(unsafe-add-raw-args "--dev /dev")
(unsafe-add-raw-args "--tmpfs /tmp")
(unsafe-add-raw-args "--tmpfs ~")
(unsafe-add-raw-args "--clearenv")
(unsafe-add-raw-args "--die-with-parent")
(add-pkg-deps [ pkgs.coreutils ])
(ro-bind "${pkgs.bash}/bin/sh" "/bin/sh")
(fwd-env "LANG")
(fwd-env "HOME")
(fwd-env "TERM")
base
bind-nix-store-runtime-closure
fake-passwd
]