Add TRITON_DC to shell prompt

This commit is contained in:
jhonas 2022-02-01 04:04:42 +01:00
parent c4fa5fd5d0
commit 1b15651865
Signed by: teutat3s
GPG key ID: 924889A86D0B0FEB
2 changed files with 3 additions and 1 deletions

View file

@ -13,10 +13,12 @@ triton_account_uuid="$(triton account get --json | json id)"
if env | grep -q "SDC_URL=https://api.greenbaum.cloud"; then if env | grep -q "SDC_URL=https://api.greenbaum.cloud"; then
export TRITON_CNS_SEARCH_DOMAIN_PUBLIC="${triton_account_uuid}.cgn-1.greenbaum.zone" export TRITON_CNS_SEARCH_DOMAIN_PUBLIC="${triton_account_uuid}.cgn-1.greenbaum.zone"
export TRITON_CNS_SEARCH_DOMAIN_PRIVATE="${triton_account_uuid}.cgn-1.int.greenbaum.zone" export TRITON_CNS_SEARCH_DOMAIN_PRIVATE="${triton_account_uuid}.cgn-1.int.greenbaum.zone"
export TRITON_DC=cgn-1
fi fi
if env | grep -q "SDC_URL=https://lev-1.api.greenbaum.cloud"; then if env | grep -q "SDC_URL=https://lev-1.api.greenbaum.cloud"; then
export TRITON_CNS_SEARCH_DOMAIN_PUBLIC="${triton_account_uuid}.lev-1.greenbaum.zone" export TRITON_CNS_SEARCH_DOMAIN_PUBLIC="${triton_account_uuid}.lev-1.greenbaum.zone"
export TRITON_CNS_SEARCH_DOMAIN_PRIVATE="${triton_account_uuid}.lev-1.int.greenbaum.zone" export TRITON_CNS_SEARCH_DOMAIN_PRIVATE="${triton_account_uuid}.lev-1.int.greenbaum.zone"
export TRITON_DC=lev-1
fi fi
export MANTA_URL=https://eu-central.manta.greenbaum.cloud export MANTA_URL=https://eu-central.manta.greenbaum.cloud

View file

@ -22,7 +22,7 @@ pkgs.devshell.mkShell {
fi fi
''; '';
PS1.text = '' PS1.text = ''
PS1='\[\033[38;5;202m\][$TRITON_PROFILE@tritonshell]$(rel_root)\$ \[\033[0m\]' PS1='\[\033[38;5;202m\][$SDC_ACCOUNT@$TRITON_DC]$(rel_root)\$ \[\033[0m\]'
''; '';
}; };