From def048b9a827aacdf4b279505462bfbb4503172d Mon Sep 17 00:00:00 2001 From: Ciapa Date: Fri, 12 Apr 2024 16:51:33 +0200 Subject: [PATCH] Manage SSH key manually until better solution is implemented --- .woodpecker/deploy.yaml | 9 ++++++--- flake.nix | 12 ++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.woodpecker/deploy.yaml b/.woodpecker/deploy.yaml index 82a15be..9aa42cc 100644 --- a/.woodpecker/deploy.yaml +++ b/.woodpecker/deploy.yaml @@ -26,12 +26,15 @@ steps: when: - evaluate: 'CI_PIPELINE_EVENT != "cron" && CI_PIPELINE_EVENT != "schedule"' + - name: Place SSH Key + image: bash + commands: + - echo $${SSH_PRIVATE_KEY}} > .privkey + - chmod 0600 .privkey + - name: Deploy image: bash commands: - - ssh-agent -s - - eval "$(ssh-agent -s)" - - ssh-add - <<< $${SSH_PRIVATE_KEY} - nix develop --command deploy environment: *nix-config diff --git a/flake.nix b/flake.nix index 52abb8b..8d3d058 100644 --- a/flake.nix +++ b/flake.nix @@ -74,7 +74,7 @@ deploy.nodes = { "phoenix.lewd.wtf" = { - sshOpts = [ "-p" "22" "-o" "StrictHostKeyChecking=no" ]; + sshOpts = [ "-p" "22" "-o" "StrictHostKeyChecking=no" "-i" ".privkey" ]; hostname = "phoenix.lewd.wtf"; fastConnection = true; @@ -87,7 +87,7 @@ }; "aztul.elmosco.lewd.wtf" = { - sshOpts = [ "-p" "22111" "-o" "StrictHostKeyChecking=no" ]; + sshOpts = [ "-p" "22111" "-o" "StrictHostKeyChecking=no" "-i" ".privkey" ]; hostname = "aztul.elmosco.lewd.wtf"; fastConnection = true; @@ -100,7 +100,7 @@ }; "rene.elmosco.lewd.wtf" = { - sshOpts = [ "-p" "22113" "-o" "StrictHostKeyChecking=no" ]; + sshOpts = [ "-p" "22113" "-o" "StrictHostKeyChecking=no" "-i" ".privkey" ]; hostname = "rene.elmosco.lewd.wtf"; fastConnection = true; @@ -113,7 +113,7 @@ }; "reject.elmosco.lewd.wtf" = { - sshOpts = [ "-p" "22104" "-o" "StrictHostKeyChecking=no" ]; + sshOpts = [ "-p" "22104" "-o" "StrictHostKeyChecking=no" "-i" ".privkey" ]; hostname = "reject.elmosco.lewd.wtf"; fastConnection = true; @@ -126,7 +126,7 @@ }; "oosi.elmosco.lewd.wtf" = { - sshOpts = [ "-p" "22106" "-o" "StrictHostKeyChecking=no" ]; + sshOpts = [ "-p" "22106" "-o" "StrictHostKeyChecking=no" "-i" ".privkey" ]; hostname = "oosi.elmosco.lewd.wtf"; fastConnection = true; @@ -139,7 +139,7 @@ }; "kinda.sus.lol" = { - sshOpts = [ "-p" "22201" "-o" "StrictHostKeyChecking=no" ]; + sshOpts = [ "-p" "22201" "-o" "StrictHostKeyChecking=no" "-i" ".privkey" ]; hostname = "kinda.sus.lol"; fastConnection = true;