From 5bf9572734025ddbe680c0c4978f72df5718ae4b Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 7 Mar 2022 19:12:06 -0300 Subject: Delete all old code and configuration to start from scratch with Guix only Delete files related to: - Terraform - opt/* - scripts/deploy - secrets/* - git-crypt - Nix --- scripts/deploy | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100755 scripts/deploy (limited to 'scripts/deploy') diff --git a/scripts/deploy b/scripts/deploy deleted file mode 100755 index d4a0128..0000000 --- a/scripts/deploy +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -set -eu - -usage() { - cat <&2 - usage >&2 - exit 2 -fi - -FILE="$(find . -name hostname.txt -exec grep -l "^$NAME$" {} \;)" -if [ -z "$FILE" ]; then - printf 'Unknown hostname "%s"\n' "$NAME" >&2 - exit 2 -fi - -DIR="$(dirname "$FILE")" - -cd "$DIR" -. ./tf-env.sh -terraform init -terraform apply -cd - > /dev/null - -TLD="$(cat "$DIR"/tld.txt)" -DIRS='/opt /srv' -# shellcheck disable=2029 -ssh "$TLD" "\ - sudo mkdir -p $DIRS && \ - sudo chown $USER:users -R $DIRS && \ - chmod -R 755 $DIRS -" - -rsync -avzPL opt "$DIR/opt" "$TLD":/ - -if [ -f "$DIR"/machines.scm ]; then - guix deploy "$DIR"/machines.scm -elif [ -f "$DIR"/configuration.nix ]; then - scp "$DIR"/configuration.nix "$TLD":/etc/nixos/ - ssh "$TLD" sudo nixos-rebuild switch -else - printf 'Uknown deploy type for "%s"\n' "$NAME" >&2 - exit 2 -fi -- cgit v1.2.3