This repository has been archived on 2026-11-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles/apply.sh
T

21 lines
577 B
Bash
Executable File

#!/usr/bin/env bash
set -e
echo "=> Ensuring local config stubs exist..."
touch ~/.local_env.nu ~/.local.nu
echo "=> Running smoke test on Nushell config..."
nu -c "source ~/.dotfiles/config/nushell/env.nu; source ~/.dotfiles/config/nushell/config.nu" || {
echo "Smoke test failed! Fix Nushell config errors before applying."
exit 1
}
echo "=> Smoke test passed. Applying home-manager configuration..."
if [[ "$(uname -s)" == "Darwin" ]]; then
TARGET="mac"
else
TARGET="linux"
fi
home-manager switch --flake .#$TARGET -b "backup-$(date +%s)"
echo "=> Done."