From 1a64deeb894dc95e2645a75771732c6cc53a79ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 4 Oct 2023 01:35:06 +0200 Subject: Squash changes containing private information There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository --- scripts/with_env | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 scripts/with_env (limited to 'scripts/with_env') diff --git a/scripts/with_env b/scripts/with_env new file mode 100755 index 0000000..783d86c --- /dev/null +++ b/scripts/with_env @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +if [ -z "$SOPS_VARS_FILE" ]; then + echo "Variable SOPS_VARS_FILE is needed with a path to the sops variables" + exit 1; +fi + +umask 0077 +TEMP=$(mktemp -d /tmp/XXXXXX-nixops-files) +chmod go-rwx $TEMP + +finish() { + rm -rf "$TEMP" +} + +trap finish EXIT + +sops -d $SOPS_VARS_FILE | yq -r .ssl_keys.nix_repository > $TEMP/id_ed25519 + +cat > $TEMP/ssh_config <