From 92b37dfee120fbe429c7ffaa03622c659e8d616e Mon Sep 17 00:00:00 2001 From: Alex David Date: Fri, 10 Oct 2025 22:51:25 -0700 Subject: [PATCH] Improve share-ns doc --- lib/combinators/share-ns.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/combinators/share-ns.nix b/lib/combinators/share-ns.nix index 0b84982..6431755 100644 --- a/lib/combinators/share-ns.nix +++ b/lib/combinators/share-ns.nix @@ -4,11 +4,20 @@ doc = '' Removes the call to `--unshare-` for the provided namespace. - By default, jail-nix unshares all namespaces, calling `share-ns "pid"` - will remove the `--unshare-pid` flag from bwrap which will allow this - process to share the same pid namespace as the host. + By default, jail-nix unshares all namespaces, this combinator allows you to + remove the unshare, allowing the jailed app access to the specified host + namespace. - See BWRAP(1) for more information. + For instance, calling `share-ns "pid"` will remove the `--unshare-pid` flag + from bwrap which will allow this process to share the same pid namespace as + the host. + + The valid namespaces that can be passed to this combinator are: `"cgroup"` + `"ipc"` `"net"` `"pid"` `"user"`, and `"uts"`. + + See [wikipedia:Linux + namespaces](https://en.wikipedia.org/wiki/Linux_namespaces) for more + information. ''; impl = namespace: state: