Add styling directory synchronization to pull script

This commit is contained in:
Root User 2026-02-12 22:14:36 +01:00
parent ff1d6b0829
commit 0f48ab5e9f
Signed by: root
GPG key ID: 087F0A95E5766D72

View file

@ -137,11 +137,27 @@ 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 # Step 2.2: Sync styling directory (copy custom themes, templates, css etc.)
STYLING_DIR="${SCRIPT_DIR}/../../styling"
STYLING_TARGET="/etc/styling"
if [[ -d "$STYLING_DIR" ]]; then
print_info "Syncing styling to ${BOLD}${STYLING_TARGET}${RESET}..."
if sudo rsync -av --delete "${STYLING_DIR}/" "${STYLING_TARGET}/"; then
print_success "Styling synced"
else
print_error "Failed to sync styling"
exit 1
fi
else
print_warn "Styling directory not found: ${STYLING_DIR}"
fi
# Step 2.3: Sync system_scripts directory
SYSTEM_SCRIPT_DIR="${SCRIPT_DIR}/../system_scripts" SYSTEM_SCRIPT_DIR="${SCRIPT_DIR}/../system_scripts"
SYSTEM_SCRIPT_TARGET="/etc/nixos/system_scripts" SYSTEM_SCRIPT_TARGET="/etc/nixos/system_scripts"
if [[ -d "$SECRETS_DIR" ]]; then if [[ -d "$SYSTEM_SCRIPT_DIR" ]]; then
print_info "Syncing system scripts to ${BOLD}${SYSTEM_SCRIPT_TARGET}${RESET}..." print_info "Syncing system scripts to ${BOLD}${SYSTEM_SCRIPT_TARGET}${RESET}..."
if sudo rsync -av --delete "${SYSTEM_SCRIPT_DIR}/" "${SYSTEM_SCRIPT_TARGET}/"; then if sudo rsync -av --delete "${SYSTEM_SCRIPT_DIR}/" "${SYSTEM_SCRIPT_TARGET}/"; then
print_success "System scripts synced" print_success "System scripts synced"