#!/usr/bin/env bash # --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. --- STATUS_FILE="/tmp/nixos-updater-status" echo "0|Starting" > "$STATUS_FILE" update_step() { echo "$1|$2" > "$STATUS_FILE" } update_step 10 "Fixing ownership" sudo chown -R "$USER":"wheel" "$REPO" update_step 30 "Updating flake" nix flake update update_step 60 "Rebuilding system" sudo nixos-rebuild switch --flake ".#$HOSTNAME" update_step 90 "Updating Flatpaks" flatpak update -y update_step 100 "Done"