fix: dynamic flake path resolution and replace env-update/sys-update aliases with scripts
This commit is contained in:
@@ -1,20 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Nomarchy Update Script
|
||||
# 1. Updates the flake inputs in /etc/nixos
|
||||
# 1. Updates the flake inputs in the repository
|
||||
# 2. Applies system-wide NixOS changes
|
||||
# 3. Applies user-level Home Manager changes
|
||||
|
||||
set -e
|
||||
|
||||
REPO_DIR="/etc/nixos"
|
||||
|
||||
if [ ! -d "$REPO_DIR" ]; then
|
||||
echo "Error: $REPO_DIR not found. Are you running on a Nomarchy system?"
|
||||
# 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 ---"
|
||||
echo "--- Starting Nomarchy Update from $REPO_DIR ---"
|
||||
|
||||
# 1. Update Flake Lock
|
||||
echo "Updating flake inputs..."
|
||||
|
||||
Reference in New Issue
Block a user