Skip to content
Snippets Groups Projects
Commit e6e4b5ec authored by Jens Nolte's avatar Jens Nolte
Browse files

Add tmpenv function

parent 785697d5
Branches arch
No related tags found
No related merge requests found
...@@ -348,5 +348,25 @@ in ...@@ -348,5 +348,25 @@ in
cd $tmpdir cd $tmpdir
zsh -is zsh -is
) )
tmpenv () {
sudo systemd-run \
--system \
--uid=$UID \
--property=ProtectSystem=strict \
--property=ProtectHome=tmpfs \
--property=TemporaryFileSystem=$HOME:nodev,noatime,nosuid,mode=0755,uid=$UID \
--property=TemporaryFileSystem=/tmp:nodev,noatime,nosuid,mode=0755,uid=$UID \
--property=BindReadOnlyPaths=-$HOME/.nix-defexpr/channels \
--property=BindPaths=$PWD \
--property=ReadWritePaths=-/nix/var/nix/daemon-socket/socket \
--pty \
--same-dir \
--wait \
--collect \
--service-type=exec \
$@ \
zsh
}
''; '';
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment