fix nixos-edit with no xorg

This commit is contained in:
Daniella / Tove 2024-10-19 03:10:34 +02:00
parent 50666f356d
commit 12bffa270e

View file

@ -12,8 +12,14 @@ pkgs.writeShellScriptBin "nixos-edit" ''
passwd tudbut || exit 1
fi
sleep 2
echo please make sure xorg is running
echo -n enter when ready
read
exec sudo -u tudbut nixos-edit init || exit 1
fi
if [ "$DISPLAY" = "" ] ; then
export DISPLAY=:0
fi
sudo chown -R tudbut: /etc/nixos
echo dir setup done
echo "> setting up ssh"