Update the pulling so it can copy system scripts
This commit is contained in:
parent
92ab262d70
commit
ce519b3343
1 changed files with 18 additions and 0 deletions
|
|
@ -117,6 +117,8 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## Todo System Conditional pulling of directories (only if it exists)
|
||||||
|
|
||||||
# Step 2.1: Sync secrets directory
|
# Step 2.1: Sync secrets directory
|
||||||
# nix-system-configs/modules/scripts /pull.zsh
|
# nix-system-configs/modules/scripts /pull.zsh
|
||||||
# nix-system-configs/secrets/songsheet/secrets.yaml
|
# nix-system-configs/secrets/songsheet/secrets.yaml
|
||||||
|
|
@ -135,6 +137,22 @@ else
|
||||||
print_warn "Secrets directory not found: ${SECRETS_DIR}"
|
print_warn "Secrets directory not found: ${SECRETS_DIR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Step 2.2: Sync system_scripts directory
|
||||||
|
SYSTEM_SCRIPT_DIR="${SCRIPT_DIR}/../../system_scripts"
|
||||||
|
SYSTEM_SCRIPT_TARGET="/etc/nixos/system_scripts"
|
||||||
|
|
||||||
|
if [[ -d "$SECRETS_DIR" ]]; then
|
||||||
|
print_info "Syncing system scripts to ${BOLD}${SYSTEM_SCRIPT_TARGET}${RESET}..."
|
||||||
|
if sudo rsync -av --delete "${SYSTEM_SCRIPT_DIR}/" "${SYSTEM_SCRIPT_TARGET}/"; then
|
||||||
|
print_success "System scripts synced"
|
||||||
|
else
|
||||||
|
print_error "Failed to sync system scripts"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
print_warn "System scripts directory not found: ${SYSTEM_SCRIPT_DIR}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Step 3: Copy configuration
|
# Step 3: Copy configuration
|
||||||
source_file="${SYSTEM_DIR}/${selected_system}.nix"
|
source_file="${SYSTEM_DIR}/${selected_system}.nix"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue