Add script to update system and user
This commit is contained in:
13
scripts/aupdate
Executable file
13
scripts/aupdate
Executable 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
|
||||
Reference in New Issue
Block a user