Derp. I frogot to check assumption. Sync secrets directory to target location
This commit is contained in:
parent
2ce94b0e7a
commit
a3274fd901
1 changed files with 11 additions and 0 deletions
|
|
@ -117,6 +117,17 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Step 2.1: Sync secrets directory
|
||||||
|
SECRETS_DIR="${SCRIPT_DIR}/../secrets"
|
||||||
|
SECRETS_TARGET="/etc/nixos/secrets"
|
||||||
|
|
||||||
|
if [[ -d "$SECRETS_DIR" ]]; then
|
||||||
|
print_info "Syncing secrets to ${BOLD}${SECRETS_TARGET}${RESET}..."
|
||||||
|
if sudo rsync -av --delete "${SECRETS_DIR}/" "${SECRETS_TARGET}/"; then
|
||||||
|
print_success "Secrets synced"
|
||||||
|
else
|
||||||
|
print_error "Failed to sync secrets"
|
||||||
|
|
||||||
# Step 3: Copy configuration
|
# Step 3: Copy configuration
|
||||||
source_file="${SYSTEM_DIR}/${selected_system}.nix"
|
source_file="${SYSTEM_DIR}/${selected_system}.nix"
|
||||||
print_info "Copying ${BOLD}${source_file}${RESET} to ${BOLD}${CONFIG_TARGET}${RESET}..."
|
print_info "Copying ${BOLD}${source_file}${RESET} to ${BOLD}${CONFIG_TARGET}${RESET}..."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue