Add script to update system and user

This commit is contained in:
2022-01-07 19:03:31 +00:00
parent 189ef03e81
commit e2925966a0
3 changed files with 24 additions and 6 deletions

13
scripts/aupdate Executable file
View File

@@ -0,0 +1,13 @@
#!/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
nix flake update
sudo nixos-rebuild switch --flake .#
hn=$(hostname)
home-manager switch --flake .#daniel-$hn
popd