Add script to setup AWS environment variables
This commit is contained in:
@@ -46,6 +46,7 @@ let
|
|||||||
agenix
|
agenix
|
||||||
android-file-transfer
|
android-file-transfer
|
||||||
bitwarden-cli
|
bitwarden-cli
|
||||||
|
configure_aws_creds
|
||||||
diffutils
|
diffutils
|
||||||
git
|
git
|
||||||
gh
|
gh
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
let
|
let
|
||||||
bw = "${pkgs.bitwarden-cli}/bin/bw";
|
bw = "${pkgs.bitwarden-cli}/bin/bw";
|
||||||
|
|
||||||
in pkgs.writeScriptBin "configure_aws_creds" ''
|
in pkgs.writeShellScriptBin "configure_aws_creds" ''
|
||||||
set -ex -o pipefail
|
set -ex -o pipefail
|
||||||
|
|
||||||
session="$(${bw} unlock | grep -e '$ export' | awk -F\" '{print $2}')"
|
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_ACCESS_KEY_ID="$(${bw} get username "AWS Access Key")"
|
||||||
export AWS_SECRET_ACCESS_KEY="$(${bw} get password "AWS Access Key")"
|
export AWS_SECRET_ACCESS_KEY="$(${bw} get password "AWS Access Key")"
|
||||||
''
|
''
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ in rec {
|
|||||||
withAACS = true;
|
withAACS = true;
|
||||||
withBDplus = true;
|
withBDplus = true;
|
||||||
};
|
};
|
||||||
setup-ssh = prev.callPackage ./setup-ssh.nix {
|
setup-ssh = prev.callPackage ./setup-ssh {
|
||||||
pkgs = final.pkgs;
|
pkgs = final.pkgs;
|
||||||
};
|
};
|
||||||
template = prev.callPackage ./template.nix { };
|
template = prev.callPackage ./template.nix { };
|
||||||
|
|||||||
Reference in New Issue
Block a user