added update presets to the updater

This commit is contained in:
2026-03-29 12:15:59 +02:00
parent 0bb5e02ce7
commit abde262f0f
2 changed files with 46 additions and 41 deletions

46
update.nu Executable file
View File

@@ -0,0 +1,46 @@
#!/usr/bin/env nu
def main [] {
./update.nu --help
}
def "main preset partial-update" [] {
main device flake
main device qepc
main device qelaptop
}
def "main preset full-update" [] {
main device flake
main device qepc
main device qelaptop
main device homelab-system
main device homelab-services
main device implovps-system
}
def "main device flake" [] {
nix flake update --flake ~/.config/dotfiles/
echo "flake updated. To commit the changes you still need to commit the lock file manually"
}
def "main device qepc" [] {
nh os switch --update
}
def "main device qelaptop" [] {
echo "not implemented"
}
def "main device homelab-system" [] {
ssh implohq 'sudo apt update && sudo apt upgrade -y'
}
def "main device homelab-services" [] {
ssh -t implohq 'cd .services/homelab && docker compose pull && docker compose up --force-recreate -d'
}
def "main device implovps-system" [] {
ssh -t implo-vps 'sudo apt update && sudo apt upgrade -y'
}