added update presets to the updater
This commit is contained in:
46
update.nu
Executable file
46
update.nu
Executable 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'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user