Clean up combinator/permission naming

The term `combinator` was overloaded before, being used to refer both to
the functions that are exposed to help build a jail, and their return
value to be passed into `jail`/`basePermissions`. This commit renames
the latter to `Permission`.
This commit is contained in:
Alex David 2025-08-07 15:42:36 -07:00
commit 09edd097b9
4 changed files with 60 additions and 51 deletions

View file

@ -8,30 +8,30 @@ All configuration options on this page can be passed into `jail-nix.lib.extend`.
`jail.combinators` and in jail definitions. If passed a funciton, jail.nix will
inject the builtin combinators.
For example, this creates a `jail` function that exposes a `my-combinator`
For example, this creates a `jail` function that exposes a `my-permission`
combinator:
```nix
jail = jail-nix.lib.extend {
inherit pkgs;
additionalCombinators = builtinCombinators: with builtinCombinators; [
my-combinator = compose [
my-permission = compose [
(readonly "/foo")
(readonly "/bar")
];
];
};
# Now my-combinator is exposed in all the places the builtin combinators are exposed:
# Now my-permission is exposed in all the places the builtin combinators are exposed:
jailed-hello = jail "jailed-hello" pkgs.hello (c: with c; [
my-combinator
my-permission
]);
# Alternatively, using jail.combinators:
jailed-hello = jail "jailed-hello" pkgs.hello [
jail.combinators.my-combinator
jail.combinators.my-permission
];
```