diff --git a/core/system/scripts/nomarchy-update b/core/system/scripts/nomarchy-update deleted file mode 100755 index 3cd406c..0000000 --- a/core/system/scripts/nomarchy-update +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -# Nomarchy Update Script -# 1. Updates the flake inputs in the repository -# 2. Applies system-wide NixOS changes -# 3. Applies user-level Home Manager changes (Standalone) - -set -e - -# Detect the repository location -if [ -f "/etc/nixos/flake.nix" ]; then - REPO_DIR="/etc/nixos" -elif [ -f "/etc/nomarchy/flake.nix" ]; then - REPO_DIR="/etc/nomarchy" -else - echo "Error: Nomarchy flake repository not found in /etc/nixos or /etc/nomarchy." - exit 1 -fi - -echo "--- Starting Nomarchy Update from $REPO_DIR ---" - -# 1. Update Flake Lock -echo "Updating flake inputs..." -sudo nix flake update --flake "$REPO_DIR" - -# 2. Rebuild System -echo "Applying system-level updates..." -sudo nixos-rebuild switch --flake "$REPO_DIR#default" --impure - -# 3. Rebuild Home Environment (Standalone) -echo "Applying user-level updates..." -home-manager switch --flake "$REPO_DIR#$USER" --impure - -# 4. Commit changes if it's a git repo -if [ -d "$REPO_DIR/.git" ]; then - echo "Committing update to local history..." - sudo git -C "$REPO_DIR" add flake.lock - sudo git -C "$REPO_DIR" commit -m "chore: update system (flake.lock)" || echo "No lockfile changes to commit." -fi - -echo "--- Nomarchy Update Complete ---" diff --git a/docs/SCRIPTS.md b/docs/SCRIPTS.md index 33ca37c..c81e294 100644 --- a/docs/SCRIPTS.md +++ b/docs/SCRIPTS.md @@ -169,7 +169,7 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`, | `nomarchy-tui-remove` | `features/scripts/utils` | core/home/config/nomarchy-skill/SKILL.md | `kept` | | | `nomarchy-tui-remove-all` | `features/scripts/utils` | core/home/config/nomarchy-skill/SKILL.md | `kept` | | | `nomarchy-tz-select` | `core/system/scripts` | features/desktop/waybar/config/config.jsonc,features/scripts/utils/nomarchy-menu, +2 more | `kept` | | -| `nomarchy-update` | `core/system/scripts` | core/home/config/nomarchy-skill/SKILL.md,core/home/config/nomarchy/default/mako/core.ini, +5 more | `kept` | | +| `nomarchy-update` | `features/scripts/utils` | core/home/config/nomarchy-skill/SKILL.md,core/home/config/nomarchy/default/mako/core.ini, +5 more | `kept` | | | `nomarchy-update-available` | `features/scripts/utils` | features/desktop/waybar/config/config.jsonc,features/desktop/waybar/themes/summer-day/config.jsonc, +1 more | `kept` | | | `nomarchy-update-firmware` | `features/scripts/utils` | features/scripts/utils/nomarchy-menu | `kept` | | | `nomarchy-update-time` | `core/system/scripts` | features/scripts/utils/nomarchy-menu | `kept` | |