mirror of
https://codeberg.org/polyteknisk-radiogruppe/the_prg_server_configuration.git
synced 2026-10-21 03:15:46 +02:00
Normalise snake cases as dashes.
Some checks failed
Build Nix modules (dry-run) / build-modules (push) Failing after 5m19s
Some checks failed
Build Nix modules (dry-run) / build-modules (push) Failing after 5m19s
This commit is contained in:
parent
b0a415a7ee
commit
44532cc3a3
2 changed files with 17 additions and 12 deletions
|
|
@ -210,12 +210,15 @@ fi
|
|||
# Step 4: Rebuild system using local flake
|
||||
# Compute repository root (three levels up from this script: .../nix-system-configs/modules/scripts -> repo root)
|
||||
FLAKE_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
|
||||
# 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
|
||||
# Map repository configuration filenames to flake nixosConfigurations names.
|
||||
# Normalise the snake-cases as dashes.
|
||||
case "${selected_system}" in
|
||||
blank_system_USE_THIS_AS_COPY) flake_name="nixos-blank" ;;
|
||||
gramethus) flake_name="nixos-logs" ;;
|
||||
wireguard_server) flake_name="nixos-local-wireguard-server" ;;
|
||||
nixos-*) flake_name="${selected_system}" ;;
|
||||
*) flake_name="nixos-${selected_system//_/-}" ;;
|
||||
esac
|
||||
|
||||
# If the selected system is the database module, use the standard non-flake rebuild
|
||||
if [[ "${selected_system}" == "database" ]]; then
|
||||
|
|
|
|||
|
|
@ -102,12 +102,14 @@ 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
|
||||
# Map repository configuration filenames to flake nixosConfigurations names.
|
||||
case "${selected_system}" in
|
||||
blank_system_USE_THIS_AS_COPY) flake_name="nixos-blank" ;;
|
||||
gramethus) flake_name="nixos-logs" ;;
|
||||
wireguard_server) flake_name="nixos-local-wireguard-server" ;;
|
||||
nixos-*) flake_name="${selected_system}" ;;
|
||||
*) flake_name="nixos-${selected_system//_/-}" ;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
if sudo NIX_CONFIG='experimental-features = nix-command flakes' nixos-rebuild switch --upgrade-all --flake "${PWD}#${flake_name}"; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue