#!/bin/sh -eux
cd "${0%/*}"/../..
-nix -L run .#mermet.switch "$@"
+host=mermet
+chmod -R g-rwx,o-rwx "$PWD"/private/hosts/*/root
+#ln -sfn "$PWD/private/hosts/$host/root" /root/private
+trap 'git reset private/hosts/*/root' EXIT
+git rm -rf --cached --ignore-unmatch private/hosts/*/root # prevent copying to /nix/store
+nix -L run .#$host.switch "$@"