Update mac config for aws and keepass

This commit is contained in:
Arnie 2025-04-30 09:13:04 +02:00
parent 6372897237
commit f8807df81c
No known key found for this signature in database
GPG Key ID: 4BDFA3BCF2999D11
2 changed files with 31 additions and 5 deletions

View File

@ -181,10 +181,10 @@ in
TERMINAL = "ghostty";
};
launchd.agents.keepass-sync = {
launchd.agents.keepass-sync-timer = {
enable = true;
config = {
Program = "${pkgs.writeShellScript "keepass-sync" ''
Program = "${pkgs.writeShellScript "keepass-sync-timer" ''
${pkgs.coreutils}/bin/cp "${homedir}/storage/.macshare/.secret/arnie.kdbx" "${homedir}/.secret/arnie.kdbx"
''}";
ProgramArguments = [ ];

View File

@ -435,6 +435,18 @@ in
sso_region = us-east-1
sso_registration_scopes = sso:account:access
[sso-session veracode-gov-stag]
sso_start_url = https://???.awsapps.com/start
sso_region = us-east-1
sso_registration_scopes = sso:account:access
[profile veracode-gov-staging-gov]
sso_account_id = 403885414333
sso_session = veracode-gov-stag
sso_role_name = Corp-Engineer
region = us-east-1
output = json
${builtins.concatStringsSep "\n" (
lib.mapAttrsToList (id: account: ''
[profile ${builtins.replaceStrings [ " " ] [ "" ] account.name}]
@ -540,26 +552,40 @@ in
programs.zsh.shellAliases = {
veracode-find = ''${pkgs.writeShellScript "veracode-find" ''
for profile in $(aws configure list-profiles | grep -E '^(us|eu)-'); do
for profile in $(aws configure list-profiles | grep -E '^(us|eu|old-world|longbow)-'); do
echo "=== $profile ==="
aws --profile $profile "$@";
done
''}'';
veracode-find-eu = ''${pkgs.writeShellScript "veracode-find" ''
veracode-find-eu = ''${pkgs.writeShellScript "veracode-find-eu" ''
for profile in $(aws configure list-profiles | grep -E '^(eu)-'); do
echo "=== $profile ==="
aws --profile $profile "$@";
done
''}'';
veracode-find-us = ''${pkgs.writeShellScript "veracode-find" ''
veracode-find-us = ''${pkgs.writeShellScript "veracode-find-us" ''
for profile in $(aws configure list-profiles | grep -E '^(us)-'); do
echo "=== $profile ==="
aws --profile $profile "$@";
done
''}'';
veracode-find-old-world = ''${pkgs.writeShellScript "veracode-find-old-world" ''
for profile in $(aws configure list-profiles | grep -E '^(old-world)-'); do
echo "=== $profile ==="
aws --profile $profile "$@";
done
''}'';
veracode-find-longbow = ''${pkgs.writeShellScript "veracode-find-longbow" ''
for profile in $(aws configure list-profiles | grep -E '^(longbow)-'); do
echo "=== $profile ==="
aws --profile $profile "$@";
done
''}'';
veracode-login = ''${pkgs.writeShellScript "veracode-login" ''
for region in us eu; do
aws sso login --profile $region-shared-services &