Skip to content

Commit

Permalink
Merge pull request #6333 from kit-ty-kate/nixos-sandbox
Browse files Browse the repository at this point in the history
Fix sandboxing support in NixOS
  • Loading branch information
kit-ty-kate authored Dec 12, 2024
2 parents a61bc92 + 07a3689 commit 8f48372
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ users)

## Sandbox
* Respect the `DUNE_CACHE_ROOT` environment variable if it exists [#6326 @smorimoto]
* Fix sandboxing support in NixOS [#6333 @kit-ty-kate]

## VCS

Expand Down
4 changes: 4 additions & 0 deletions src/state/shellscripts/bwrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ for dir in /*; do
*) add_sys_mounts "$dir";;
esac
done
# NOTE: This is required for NixOS (see https://github.com/NixOS/nixpkgs/pull/363770)
if [ -d /run/current-system/sw ]; then
add_sys_mounts /run/current-system/sw
fi

mount_linked_cache() {
local l_cache=$1
Expand Down

0 comments on commit 8f48372

Please sign in to comment.