Add script to setup AWS environment variables

This commit is contained in:
Greg Hellings
2024-01-20 21:21:38 -06:00
parent 638d545fb7
commit 004171f16d
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -46,6 +46,7 @@ let
agenix
android-file-transfer
bitwarden-cli
configure_aws_creds
diffutils
git
gh
+2 -2
View File
@@ -2,11 +2,11 @@
let
bw = "${pkgs.bitwarden-cli}/bin/bw";
in pkgs.writeScriptBin "configure_aws_creds" ''
in pkgs.writeShellScriptBin "configure_aws_creds" ''
set -ex -o pipefail
session="$(${bw} unlock | grep -e '$ export' | awk -F\" '{print $2}')"
export BW_SESSION="${session}"
export BW_SESSION="''${session}"
export AWS_ACCESS_KEY_ID="$(${bw} get username "AWS Access Key")"
export AWS_SECRET_ACCESS_KEY="$(${bw} get password "AWS Access Key")"
''
+1 -1
View File
@@ -59,7 +59,7 @@ in rec {
withAACS = true;
withBDplus = true;
};
setup-ssh = prev.callPackage ./setup-ssh.nix {
setup-ssh = prev.callPackage ./setup-ssh {
pkgs = final.pkgs;
};
template = prev.callPackage ./template.nix { };