Compare commits
No commits in common. "b163b2f9ce897a4a0b66a8b6714bffcc866d6b6f" and "22511d023802006bfa00f5fe0f65d2fd5514e6a8" have entirely different histories.
b163b2f9ce
...
22511d0238
@ -97,9 +97,7 @@
|
||||
system = "aarch64-darwin";
|
||||
specialArgs = {
|
||||
self = self;
|
||||
inputs = inputs // {
|
||||
darwin = inputs.nix-darwin;
|
||||
};
|
||||
inputs = inputs // { darwin = inputs.nix-darwin; };
|
||||
};
|
||||
modules = [
|
||||
# Add our overlay to the system configuration
|
||||
|
||||
@ -107,6 +107,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
@ -12,16 +11,12 @@ let
|
||||
|
||||
gitUsername = "Lukas Cech";
|
||||
gitEmail = "lcech@veracode.com";
|
||||
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(import ./veracode/aws-cli.nix {
|
||||
inherit
|
||||
config
|
||||
homedir
|
||||
lib
|
||||
pkgs
|
||||
;
|
||||
inherit homedir lib pkgs;
|
||||
})
|
||||
];
|
||||
|
||||
|
||||
@ -60,16 +60,11 @@ in
|
||||
|
||||
SHARABLE_URL="$SSO_URL/#/console?account_id=$ACCOUNT_ID&role_name=$ROLE_NAME&destination=$(${pkgs.urlencode}/bin/urlencode "https://$URL")"
|
||||
|
||||
${
|
||||
if isDarwin then
|
||||
''
|
||||
echo -n "$SHARABLE_URL" | pbcopy
|
||||
''
|
||||
else
|
||||
''
|
||||
echo -n "$SHARABLE_URL" | ${pkgs.xclip}/bin/xclip -selection clipboard
|
||||
''
|
||||
}
|
||||
${if isDarwin then ''
|
||||
echo -n "$SHARABLE_URL" | pbcopy
|
||||
'' else ''
|
||||
echo -n "$SHARABLE_URL" | ${pkgs.xclip}/bin/xclip -selection clipboard
|
||||
''}
|
||||
echo "URL copied to clipboard"
|
||||
''}";
|
||||
|
||||
@ -97,16 +92,14 @@ in
|
||||
|
||||
git-sync-remote = lib.mkDefault "git remote update origin --prune";
|
||||
|
||||
cleanup-kube-config = "${
|
||||
pkgs.writeShellApplication {
|
||||
name = "app";
|
||||
text = ./zsh/aliases/cleanup-kube-config.sh;
|
||||
runtimeInputs = [
|
||||
pkgs.gnugrep
|
||||
pkgs.coreutils
|
||||
];
|
||||
}
|
||||
}/bin/app";
|
||||
cleanup-kube-config = "${pkgs.writeShellApplication {
|
||||
name = "app";
|
||||
text = ./zsh/aliases/cleanup-kube-config.sh;
|
||||
runtimeInputs = [
|
||||
pkgs.gnugrep
|
||||
pkgs.coreutils
|
||||
];
|
||||
}}/bin/app";
|
||||
|
||||
klogs = lib.mkDefault "${pkgs.writeShellScript "klogs" ''
|
||||
ctx="$1"
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
[govus-stage]
|
||||
okta_org_url = https://govus-staging-veracode.okta.com
|
||||
gimme_creds_server = appurl
|
||||
aws_rolename = arn:aws-us-gov:iam::403885414333:role/Corp-Engineer
|
||||
write_aws_creds = False
|
||||
cred_profile = role
|
||||
okta_username = lcech@veracode.com
|
||||
app_url = https://govus-staging-veracode.okta.com/home/amazon_aws/0oame0n0rGjDo9BvZ4h6/272
|
||||
resolve_aws_alias = False
|
||||
include_path = True
|
||||
preferred_mfa_type = push
|
||||
remember_device = True
|
||||
aws_default_duration = 3600
|
||||
output_format = export
|
||||
force_classic = True
|
||||
enable_keychain = True
|
||||
@ -1,5 +1,4 @@
|
||||
{
|
||||
config,
|
||||
homedir,
|
||||
lib,
|
||||
pkgs,
|
||||
@ -552,7 +551,24 @@ in
|
||||
};
|
||||
|
||||
home.file."${homedir}/.okta_aws_login_config" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${homedir}/.config/nix/home-manager/veracode/.okta_aws_login_config";
|
||||
text = ''
|
||||
[DEFAULT]
|
||||
okta_org_url = https://govus-staging-veracode.okta.com
|
||||
gimme_creds_server = appurl
|
||||
aws_rolename = arn:aws-us-gov:iam::403885414333:role/Corp-Engineer
|
||||
write_aws_creds = False
|
||||
cred_profile = role
|
||||
okta_username = lcech@veracode.com
|
||||
app_url = https://govus-staging-veracode.okta.com/home/amazon_aws/0oame0n0rGjDo9BvZ4h6/272
|
||||
resolve_aws_alias = False
|
||||
include_path = True
|
||||
preferred_mfa_type = push
|
||||
remember_device = True
|
||||
aws_default_duration = 3600
|
||||
output_format = export
|
||||
force_classic = True
|
||||
enable_keychain = True
|
||||
'';
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
@ -560,11 +576,6 @@ in
|
||||
];
|
||||
|
||||
programs.zsh.shellAliases = {
|
||||
export-aws-govus-stage = ''${pkgs.writeShellScript "export-aws-govus-stage" ''
|
||||
gimme-aws-creds --profile govus-stage
|
||||
echo "export AWS_REGION=us-gov-west-1"
|
||||
''}'';
|
||||
|
||||
veracode-find = ''${pkgs.writeShellScript "veracode-find" ''
|
||||
for profile in $(aws configure list-profiles | grep -E '^(us|eu|old-world|longbow)-'); do
|
||||
echo "=== $profile ==="
|
||||
|
||||
Loading…
Reference in New Issue
Block a user