refactor: streamline setup process by removing Home Manager rebuild and adding initial dotf update
All checks were successful
Nix Format Check / check-format (push) Successful in 38s

This commit is contained in:
Menno van Leeuwen 2025-01-22 15:41:30 +01:00
parent 7a39c2c962
commit c1700f42dd
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -399,21 +399,21 @@ main() {
install_home_manager install_home_manager
setup_symlinks setup_symlinks
setup_ansible setup_ansible
# Get hostname # Get hostname
local hostname local hostname
hostname=$(cat "$HOME/.hostname") || die "Failed to read hostname" hostname=$(cat "$HOME/.hostname") || die "Failed to read hostname"
export PATH=$PATH:$HOME/dotfiles/bin
# Rebuild Home Manager
cd "$DOTFILES_DIR/config/home-manager" || die "Failed to change to home-manager config directory"
NIXPKGS_ALLOW_UNFREE=1 NIXPKGS_ALLOW_INSECURE=1 home-manager switch --extra-experimental-features flakes --extra-experimental-features nix-command --flake ".#$hostname" --impure -b backup || \
die "Failed to rebuild Home Manager"
# Create setup marker # Create setup marker
touch "$SETUP_MARKER" || die "Failed to create setup marker" touch "$SETUP_MARKER" || die "Failed to create setup marker"
# Initial run of dotf update
dotf update || die "Failed to run 'dotf update', please see the output for more information"
# Final success message # Final success message
log_success "\nSetup complete. Please logout / restart to continue with 'dotf update'.\n" log_success "\nSetup complete. Please logout / restart to continue with 'dotf update'.\n"
log_error "\n!!! Please logout / restart to continue !!!" log_error "\n!!! Please logout / restart to continue !!!"