Compare commits

..

2 Commits

Author SHA1 Message Date
f8807df81c
Update mac config for aws and keepass 2025-04-30 09:13:04 +02:00
6372897237
Update flake inputs 2025-04-30 09:12:38 +02:00
5 changed files with 49 additions and 25 deletions

View File

@ -74,11 +74,11 @@
]
},
"locked": {
"lastModified": 1741128660,
"narHash": "sha256-GWaZ+KGxWYbOB15CSqktwngq0ccA1l2Ov3aUfl9jeY4=",
"lastModified": 1745987135,
"narHash": "sha256-8Up4QPuMZEJBU0eefAY+nUe7DYKQQzvaHnMpNdwRgKA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "b1b964ea9348aef08cab514fa88e9c99def6fd63",
"rev": "d2b3e6c83d457aa0e7f9344c61c3fed32bad0f7e",
"type": "github"
},
"original": {
@ -98,11 +98,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1739821351,
"narHash": "sha256-QlVtMzAhECs9Esq3txqVW7/vM78ipB5IcI8uyCbTP7A=",
"lastModified": 1742156590,
"narHash": "sha256-aTM/2CrNN5utdVEQGsOA+kl4UozgH7VPLBQL5OXtBrg=",
"owner": "hraban",
"repo": "mac-app-util",
"rev": "c00d5b21ca1fdab8acef65e696795f0f15ec1158",
"rev": "341ede93f290df7957047682482c298e47291b4d",
"type": "github"
},
"original": {
@ -118,11 +118,11 @@
]
},
"locked": {
"lastModified": 1741112248,
"narHash": "sha256-Y340xoE1Vgo0eCDJi4srVjuwlr50vYSoyJrZeXHw3n0=",
"lastModified": 1745816321,
"narHash": "sha256-Gyh/fkCDqVNGM0BWvk+4UAS17w2UI6iwnbQQCmc1TDI=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "991bb2f6d46fc2ff7990913c173afdb0318314cb",
"rev": "4515dacafb0ccd42e5395aacc49fd58a43027e01",
"type": "github"
},
"original": {
@ -154,11 +154,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1741037377,
"narHash": "sha256-SvtvVKHaUX4Owb+PasySwZsoc5VUeTf1px34BByiOxw=",
"lastModified": 1745934659,
"narHash": "sha256-odZyAgjybOV1ha/lEoVL5HVOJw1YqFDfem9u3t+VB2o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "02032da4af073d0f6110540c8677f16d4be0117f",
"rev": "fbc071e5c11e23fba50037de37268e3d8a1858eb",
"type": "github"
},
"original": {
@ -178,11 +178,11 @@
]
},
"locked": {
"lastModified": 1740569341,
"narHash": "sha256-WV8nY2IOfWdzBF5syVgCcgOchg/qQtpYh6LECYS9XkY=",
"lastModified": 1742765550,
"narHash": "sha256-2vVIh2JrL6GAGfgCeY9e6iNKrBjs0Hw3bGQEAbwVs68=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "5eeb0172fb74392053b66a8149e61b5e191b2845",
"rev": "b70be387276e632fe51232887f9e04e2b6ef8c16",
"type": "github"
},
"original": {

View File

@ -143,7 +143,6 @@ in
programs.lsd = {
enable = true;
enableAliases = true;
settings = {
blocks = [
"permission"
@ -271,7 +270,7 @@ in
c4 = "/mnt/yosuke/share/arnie/smarthome/control4/drivers";
};
initExtra = ''
initContent = ''
${builtins.concatStringsSep "\n" (
builtins.map (dir: ''
for file in ${dir}/*.zsh; do

View File

@ -195,7 +195,7 @@ in
{ }
);
initExtra = lib.mkBefore ''
initContent = lib.mkBefore ''
for file in ${zshSourceCommon}/*.zsh; do
source "$file"
done

View File

@ -123,7 +123,6 @@ in
programs.lsd = {
enable = true;
enableAliases = true;
settings = {
blocks = [
"permission"
@ -158,7 +157,7 @@ in
hammerspoon-config = "open -a ${pkgs.hammerspoon}/Applications/Hammerspoon.app/Contents/MacOS/Hammerspoon";
};
initExtra = ''
initContent = ''
${builtins.concatStringsSep "\n" (
builtins.map (dir: ''
for file in ${dir}/*.zsh; do
@ -182,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 &