diff --git a/updater.nu b/updater.nu index e69de29..03e7bc9 100755 --- a/updater.nu +++ b/updater.nu @@ -0,0 +1,41 @@ +#!/usr/bin/env nu + +def main [] { + update_all + +} + +def update_all [] { + main flake + main qepc + main qelaptop + main homelab-system + main homelab-services + main implovps-system +} + +def "main 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 qepc" [] { + nh os switch --update +} + +def "main qelaptop" [] { + echo "not implemented" +} + +def "main homelab-system" [] { + ssh implohq 'sudo apt update && sudo apt upgrade -y' +} + +def "main homelab-services" [] { + ssh -t implohq 'cd .services/homelab && docker compose pull && docker compose up --force-recreate -d' +} + +def "main implovps-system" [] { + ssh -t implo-vps 'sudo apt update && sudo apt upgrade -y' +} +