feat(audit): address batch 2 of missing scripts
- Implement nomarchy-version, nomarchy-debug, nomarchy-reinstall, nomarchy-rollback, nomarchy-upload-log - Implement nomarchy-refresh-hyprland and nomarchy-refresh-waybar - Update docs/SCRIPTS.md with 'kept' status for new scripts
This commit is contained in:
22
features/scripts/utils/nomarchy-reinstall
Executable file
22
features/scripts/utils/nomarchy-reinstall
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Nomarchy Reinstall Script
|
||||
# Performs a fresh 'switch' to the current declarative state.
|
||||
|
||||
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 "Performing system reinstall from $REPO_DIR..."
|
||||
# --refresh forces a download of flake inputs if they've changed upstream but not in lock
|
||||
sudo nixos-rebuild switch --flake "$REPO_DIR#default" --refresh --impure
|
||||
|
||||
echo "Reinstall complete."
|
||||
Reference in New Issue
Block a user