New update script

This commit is contained in:
2022-01-14 03:20:08 +00:00
parent fc3ee9154e
commit 500b5608e9
2 changed files with 22 additions and 6 deletions

11
scripts/bupdate Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
if [ "$UID" -ne 0 ]; then
sudo true # Prompt user for password so it doesn't happen in the middle of the script
fi
pushd ~/.dotfiles
sudo nixos-rebuild switch --flake .#
hn=$(hostname)
home-manager switch --flake .#daniel-$hn
popd