mirror of
https://codeberg.org/polyteknisk-radiogruppe/the_prg_server_configuration.git
synced 2026-06-14 02:38:58 +02:00
Fix the script...
This commit is contained in:
parent
947b4d711c
commit
d2b554b18c
2 changed files with 17 additions and 3 deletions
|
|
@ -101,8 +101,16 @@ echo ""
|
|||
|
||||
# Step 1: Rebuild system
|
||||
print_info "Rebuilding NixOS system..."
|
||||
|
||||
# Normalize selected system name to flake nixosConfigurations naming convention (prefix with 'nixos-' if missing)
|
||||
if [[ "${selected_system}" == nixos-* ]]; then
|
||||
flake_name="${selected_system}"
|
||||
else
|
||||
flake_name="nixos-${selected_system}"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
if sudo nixos-rebuild switch --upgrade-all; then
|
||||
if sudo NIX_CONFIG='experimental-features = nix-command flakes' nixos-rebuild switch --upgrade-all --flake "${PWD}#${flake_name}"; then
|
||||
print_success "System rebuild completed"
|
||||
else
|
||||
print_error "System rebuild failed"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue