diff --git a/nix-system-configs/modules/scripts/pull.zsh b/nix-system-configs/modules/scripts/pull.zsh index ff45581..42554bf 100755 --- a/nix-system-configs/modules/scripts/pull.zsh +++ b/nix-system-configs/modules/scripts/pull.zsh @@ -207,13 +207,26 @@ if [[ "${selected_system}" == nixos-* ]]; then else flake_name="nixos-${selected_system}" fi -print_info "Rebuilding NixOS system using flake at ${BOLD}${FLAKE_ROOT}#${flake_name}${RESET}..." -echo "" -if sudo NIX_CONFIG='experimental-features = nix-command flakes' nixos-rebuild switch --upgrade-all --flake "${FLAKE_ROOT}#${flake_name}"; then - print_success "System rebuild completed successfully!" + +# If the selected system is the database module, use the standard non-flake rebuild +if [[ "${selected_system}" == "database" ]]; then + print_info "Rebuilding NixOS system (non-flake) for ${BOLD}${selected_system}${RESET}..." + echo "" + if sudo nixos-rebuild switch --upgrade-all; then + print_success "System rebuild completed successfully!" + else + print_error "System rebuild failed" + exit 1 + fi else - print_error "System rebuild failed" - exit 1 + print_info "Rebuilding NixOS system using flake at ${BOLD}${FLAKE_ROOT}#${flake_name}${RESET}..." + echo "" + if sudo NIX_CONFIG='experimental-features = nix-command flakes' nixos-rebuild switch --upgrade-all --flake "${FLAKE_ROOT}#${flake_name}"; then + print_success "System rebuild completed successfully!" + else + print_error "System rebuild failed" + exit 1 + fi fi echo ""