From cdd7f5e1ba8ac50d67834106c1af847690a9c719 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 17 Mar 2019 10:10:19 +0100 Subject: [PATCH] Revert "Revert personnal nix path" This reverts commit 774d7a7f22bc36c4554750c9f575b6d7d3c776e3. --- nixops/modules/pub/restrict | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixops/modules/pub/restrict b/nixops/modules/pub/restrict index b2f3be3..6204aa2 100644 --- a/nixops/modules/pub/restrict +++ b/nixops/modules/pub/restrict @@ -2,6 +2,7 @@ user="$1" rootuser="$HOME/$user/" mkdir -p $rootuser +mkdir -p $HOME/$user-nixstore orig="$SSH_ORIGINAL_COMMAND" if [ -z "$orig" ]; then @@ -28,6 +29,7 @@ rsync*) set -euo pipefail (exec -c bwrap --ro-bind /usr /usr \ + --bind /var/lib/pub/$user-nixstore /nix \ --args 10 \ --dir /tmp \ --dir /var \ @@ -44,6 +46,7 @@ rsync*) --bind /var/lib/pub/$user /var/lib/pub \ --dir /var/lib/commons \ --ro-bind $TMUX_RESTRICT /var/lib/commons/tmux.restrict.conf \ + --file 9 /var/lib/commons/nix-dump \ --chdir /var/lib/pub \ --unshare-all \ --share-net \ @@ -57,6 +60,7 @@ rsync*) --file 11 /etc/passwd \ --file 12 /etc/group \ -- $orig) \ + 9< <(nix-store --dump-db) \ 10< <(nix_store_paths) \ 11< <(getent passwd $UID 65534) \ 12< <(getent group $(id -g) 65534) -- 2.41.0