Merge branch 'master' of ssh://git.cyberstuff.me:222/T31M/dotfiles
This commit is contained in:
@ -1,11 +1,5 @@
|
|||||||
# deno config
|
set -Ux PYENV_ROOT $HOME/.pyenv
|
||||||
set -Ux DENO_INSTALL /home/t31m/.deno
|
set -Ux fish_user_paths $PYENV_ROOT/bin $fish_user_paths
|
||||||
set -Ux PATH $DENO_INSTALL/bin $PATH
|
|
||||||
|
|
||||||
# pipx
|
|
||||||
if test (command -v pipx)
|
|
||||||
register-python-argcomplete --shell fish pipx | .
|
|
||||||
end
|
|
||||||
|
|
||||||
# pyenv init
|
# pyenv init
|
||||||
if command -v pyenv 1>/dev/null 2>&1
|
if command -v pyenv 1>/dev/null 2>&1
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
FabioAntunes/fish-nvm
|
jorgebucaran/fisher
|
||||||
edc/bass
|
edc/bass
|
||||||
jethrokuan/fzf
|
jethrokuan/fzf
|
||||||
|
FabioAntunes/fish-nvm
|
||||||
@ -1,4 +1,4 @@
|
|||||||
# TWAICE AWS Credential Management for FiSH
|
# AWS Credential Management for FiSH
|
||||||
|
|
||||||
# TODO change your user
|
# TODO change your user
|
||||||
set AWS_IAM_USER ""
|
set AWS_IAM_USER ""
|
||||||
@ -24,19 +24,19 @@ function envAWS --description 'switch to different aws account environments (-)
|
|||||||
switch $argv[1]
|
switch $argv[1]
|
||||||
case dev
|
case dev
|
||||||
echo "switching to /refreshing dev"
|
echo "switching to /refreshing dev"
|
||||||
aws-mfa --assume-role arn:aws:iam::$DEV_ACCOUNT_ID:role/Administrators --duration 43200 --role-session-name $AWS_IAM_USER
|
aws-mfa --assume-role arn:aws:iam::$DEV_ACCOUNT_ID:role/Administrator --duration 43200 --role-session-name $AWS_IAM_USER
|
||||||
getAWSenv
|
getAWSenv
|
||||||
case stg
|
case stg
|
||||||
echo "switching to /refreshing staging"
|
echo "switching to /refreshing staging"
|
||||||
aws-mfa --assume-role arn:aws:iam::$STG_ACCOUNT_ID:role/Administrators --duration 43200 --role-session-name $AWS_IAM_USER
|
aws-mfa --assume-role arn:aws:iam::$STG_ACCOUNT_ID:role/Administrator --duration 43200 --role-session-name $AWS_IAM_USER
|
||||||
getAWSenv
|
getAWSenv
|
||||||
case prod
|
case prod
|
||||||
echo "switching to /refreshing prod"
|
echo "switching to /refreshing prod"
|
||||||
aws-mfa --assume-role arn:aws:iam::$PROD_ACCOUNT_ID:role/Administrators --duration 3600 --role-session-name $AWS_IAM_USER
|
aws-mfa --assume-role arn:aws:iam::$PROD_ACCOUNT_ID:role/Administrator --duration 3600 --role-session-name $AWS_IAM_USER
|
||||||
getAWSenv
|
getAWSenv
|
||||||
case ops
|
case ops
|
||||||
echo "switching to /refreshing ops"
|
echo "switching to /refreshing ops"
|
||||||
aws-mfa --assume-role arn:aws:iam::$OPS_ACCOUNT_ID:role/Administrators --duration 3600 --role-session-name $AWS_IAM_USER
|
aws-mfa --assume-role arn:aws:iam::$OPS_ACCOUNT_ID:role/Administrator --duration 3600 --role-session-name $AWS_IAM_USER
|
||||||
getAWSenv
|
getAWSenv
|
||||||
case '*'
|
case '*'
|
||||||
echo "Wrong / Invalid Environment provided"
|
echo "Wrong / Invalid Environment provided"
|
||||||
@ -5,11 +5,6 @@ function ssm_tunnel --description 'access private AWS ressources via Bastion Hos
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
#if [ "$AWS_PROFILE" != "twaice-ops"* ]
|
|
||||||
# echo "Switch to OPS ENV first"
|
|
||||||
# return
|
|
||||||
#end
|
|
||||||
|
|
||||||
# Get bastion host ID using it's name
|
# Get bastion host ID using it's name
|
||||||
set INSTANCE_ID (aws ec2 describe-instances \
|
set INSTANCE_ID (aws ec2 describe-instances \
|
||||||
--filter 'Name=tag:Name,Values=ops-infrastructure-bastion'\
|
--filter 'Name=tag:Name,Values=ops-infrastructure-bastion'\
|
||||||
@ -3,41 +3,39 @@
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
# install nvm
|
# install nvm
|
||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
|
||||||
|
|
||||||
# install pyenv
|
# install pyenv
|
||||||
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
|
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
|
||||||
|
|
||||||
# install pyenv-virtualenv plugin
|
|
||||||
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
|
|
||||||
|
|
||||||
# install fzf from source
|
# install fzf from source
|
||||||
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
||||||
bash ~/.fzf/install --no-update-rc --completion --key-bindings
|
bash ~/.fzf/install --no-update-rc --completion --key-bindings
|
||||||
|
|
||||||
# install fisher
|
# install fisher
|
||||||
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish
|
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher $plugins
|
||||||
|
|
||||||
# copy fish config
|
# copy fish config
|
||||||
if test -f "~/.config/fish/config.fish"; then
|
if test -f "~/.config/fish/functions/config.fish"; then
|
||||||
echo "config.fish already exist, please rename to continue."
|
echo "config.fish already exist, please rename to continue."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
cp fish/config.fish ~/.config/fish/
|
cp fish/config.fish ~/.config/fish/functions/
|
||||||
|
|
||||||
# copy fishfile
|
# copy fishfile
|
||||||
if test -f "~/.config/fish/fishfile"; then
|
if test -f "~/.config/fish/fish_plugins"; then
|
||||||
echo "fishfile already exist, please rename to continue."
|
echo "fish_plugins already exist, please rename to continue."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
cp fish/fishfile ~/.config/fish/
|
cp fish/fish_plugins ~/.config/fish/
|
||||||
|
|
||||||
echo "set --export PYENV_ROOT $HOME/.pyenv" > ~/.config/fish/conf.d/pyenv.fish
|
echo "set --export PYENV_ROOT $HOME/.pyenv" > ~/.config/fish/conf.d/pyenv.fish
|
||||||
|
|
||||||
# install packages from fishfile
|
# install packages from fishfile
|
||||||
fish -c "fisher self-update"
|
fish -c "fisher install jorgebucaran/fisher"
|
||||||
fish -c fisher
|
fish -c "fisher install (pwd)/fish/theme-t31m"
|
||||||
fish -c "fisher add (pwd)/fish/theme-t31m"
|
fish -c "fisher install FabioAntunes/fish-nvm"
|
||||||
|
fish -c "fisher update"
|
||||||
|
|
||||||
# set fish default shell
|
# set fish default shell
|
||||||
echo "Change your default Shell to FiSH: chsh -s /usr/bin/fish"
|
echo "Change your default Shell to FiSH: chsh -s /usr/bin/fish"
|
||||||
|
|||||||
5
main.sh
5
main.sh
@ -21,9 +21,4 @@ chmod +x /usr/local/bin/docker-compose
|
|||||||
|
|
||||||
usermod -aG docker t31m
|
usermod -aG docker t31m
|
||||||
|
|
||||||
curl -sL -o ~/usr/local/bin/conky-x86_64.AppImage \
|
|
||||||
$(curl -sL https://api.github.com/repos/brndnmtthws/conky/releases/latest | \
|
|
||||||
jq --raw-output '.assets[0] | .browser_download_url')
|
|
||||||
chmod +x /usr/local/bin/conky-x86_64.AppImage
|
|
||||||
|
|
||||||
echo "Initial Setup Complete. Please run fish_setup.sh for env setup"
|
echo "Initial Setup Complete. Please run fish_setup.sh for env setup"
|
||||||
|
|||||||
Reference in New Issue
Block a user