infrastructure/scripts/export_secret.sh
sinavir 966e1ed038
fix(ap01/radius-secret): Use environment variable for radius secret
This is a hack, please fix it in the next iteration of the project
2025-01-31 17:35:31 +01:00

13 lines
391 B
Bash
Executable file

# SPDX-FileCopyrightText: 2024 Maurice Debray <maurice.debray@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
DECRYPT=()
if [ -f "$HOME/.ssh/id_rsa" ]; then
DECRYPT+=(-i "$HOME/.ssh/id_rsa")
fi
if [ -f "$HOME/.ssh/id_ed25519" ]; then
DECRYPT+=(-i "$HOME/.ssh/id_ed25519")
fi
export RADIUS_SECRET=$(rage "${DECRYPT[@]}" -d ./machines/nixos/vault01/secrets/radius-ap-radius-secret_file)