mirror of
https://codeberg.org/polyteknisk-radiogruppe/the_prg_server_configuration.git
synced 2026-06-13 18:28:55 +02:00
Add support for non-flake rebuild for database module in NixOS system to ensure it does not break user systems space.
This commit is contained in:
parent
4aeb2fd7d7
commit
a01ca0de92
1 changed files with 19 additions and 6 deletions
|
|
@ -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 ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue