From e0ad8e2a46e17ee5a8b8986c7da0c8720360324a Mon Sep 17 00:00:00 2001 From: Andrejus Date: Fri, 22 Jan 2021 18:38:42 +0000 Subject: [PATCH 1/3] Update fish deps, fix deb install --- files/.config/fish/config.fish | 10 +++++++--- files/.config/fish/fish_plugins | 4 ++++ files/.config/fish/fishfile | 8 -------- files/.config/nvim/init.vim | 8 ++++---- install/02-fish.sh | 4 +++- install/10-pyenv-pkglist | 16 +++++++++------- install/30-docker.sh | 5 +++-- install/utils.sh | 5 ++--- 8 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 files/.config/fish/fish_plugins delete mode 100644 files/.config/fish/fishfile diff --git a/files/.config/fish/config.fish b/files/.config/fish/config.fish index 16be849..424df08 100644 --- a/files/.config/fish/config.fish +++ b/files/.config/fish/config.fish @@ -1,9 +1,13 @@ +set --global hydro_symbol_prompt "\$" +set --global hydro_symbol_git_dirty "~" +set --global hydro_fetch true + if status --is-interactive # Cross-shell setup - if begin; test -e ~/.bash_profile; and type -q bax; end - bax "source ~/.bash_profile" + if begin; test -e ~/.bash_profile; and type -q replay; end + replay "source ~/.bash_profile" end - + # Fish specific set fish_greeting if type -q base16-seti diff --git a/files/.config/fish/fish_plugins b/files/.config/fish/fish_plugins new file mode 100644 index 0000000..1bb230a --- /dev/null +++ b/files/.config/fish/fish_plugins @@ -0,0 +1,4 @@ +tomyun/base16-fish +jorgebucaran/fish-bax +jethrokuan/z +jorgebucaran/hydro diff --git a/files/.config/fish/fishfile b/files/.config/fish/fishfile deleted file mode 100644 index 6fd64bd..0000000 --- a/files/.config/fish/fishfile +++ /dev/null @@ -1,8 +0,0 @@ -fishpkg/fish-prompt-mono -tomyun/base16-fish -gazorby/fish-abbreviation-tips -oh-my-fish/plugin-license -matchai/fish-mock -jorgebucaran/fish-bax -jethrokuan/z -joseluisq/gitnow diff --git a/files/.config/nvim/init.vim b/files/.config/nvim/init.vim index 9bca18b..66514fc 100644 --- a/files/.config/nvim/init.vim +++ b/files/.config/nvim/init.vim @@ -1,6 +1,6 @@ -source $XDG_CONFIG_HOME/nvim/base.vim +runtime base.vim -source $XDG_CONFIG_HOME/nvim/plugins.vim -source $XDG_CONFIG_HOME/nvim/plugins-config.vim +runtime plugins.vim +runtime plugins-config.vim -source $XDG_CONFIG_HOME/nvim/mappings.vim +runtime mappings.vim diff --git a/install/02-fish.sh b/install/02-fish.sh index ca0ee60..3278afa 100755 --- a/install/02-fish.sh +++ b/install/02-fish.sh @@ -17,7 +17,7 @@ if ! [ -f "$fisher_location" ]; then curl https://git.io/fisher --create-dirs -sLo "$fisher_location" fi echo "fisher is installed, updating..." -`fish -c "fisher"`; +fish -c "fisher update"; fish -c "fisher --version" @@ -25,10 +25,12 @@ if not_installed "fishlogin"; then echo "setting up fishlogin..." mkdir -p ~/bin target="$HOME/bin/fishlogin" + tee -a $target << END #!/bin/bash exec -l fish "\$@" END + sudo chmod +x $target echo $target | sudo tee -a /etc/shells sudo usermod -s $target $USER diff --git a/install/10-pyenv-pkglist b/install/10-pyenv-pkglist index 22850e6..df0cd09 100644 --- a/install/10-pyenv-pkglist +++ b/install/10-pyenv-pkglist @@ -1,13 +1,15 @@ -build-essential -libssl-dev +build-essential +libssl-dev libbz2-dev libreadline-dev +libreadline6 +libreadline6-dev libsqlite3-dev llvm libncurses5-dev libncursesw5-dev -xz-utils -tk-dev -libffi-dev -liblzma-dev -python-openssl +xz-utils +tk-dev +libffi-dev +liblzma-dev +zlib1g-dev diff --git a/install/30-docker.sh b/install/30-docker.sh index b89dacb..e758e21 100755 --- a/install/30-docker.sh +++ b/install/30-docker.sh @@ -15,9 +15,10 @@ if not_installed "docker"; then software-properties-common # Add repository - add_key "https://download.docker.com/linux/ubuntu/gpg" + distro=$(lsb_release -si | tr '[:upper:]' '[:lower:]') # cast to lowercase + add_key "https://download.docker.com/linux/$distro/gpg" "docker-apt-key" sudo add-apt-repository -y \ - "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ + "deb [arch=amd64] https://download.docker.com/linux/$distro \ $(lsb_release -cs) \ stable" update diff --git a/install/utils.sh b/install/utils.sh index 8a15314..9f32904 100755 --- a/install/utils.sh +++ b/install/utils.sh @@ -39,10 +39,9 @@ add_ppa() { } # @arg $1 url to add +# @arg $2 keyring to add to add_key() { - APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=true \ - curl -fsSL $1 \ - | sudo apt-key add - + curl -fsSL $1 | sudo apt-key --keyring "/etc/apt/trusted.gpg.d/$2.gpg" add } # @arg $1 URL to run From ae886b0984685a5caad1b07fc44094d458a2f061 Mon Sep 17 00:00:00 2001 From: Andrejus Date: Sun, 31 Jan 2021 21:17:32 +0000 Subject: [PATCH 2/3] fix: nvm and ctrl-c race condition --- files/.bash_profile | 1 - files/.bashrc | 3 --- files/.config/fish/functions/nvm.fish | 2 +- files/.profile | 28 +++++++++++++-------------- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/files/.bash_profile b/files/.bash_profile index 4bfc7d0..0a45628 100644 --- a/files/.bash_profile +++ b/files/.bash_profile @@ -8,4 +8,3 @@ # References: # https://unix.stackexchange.com/questions/192521/loading-profile-from-bash-profile-or-not-using-bash-profile-at-all # https://www.stefaanlippens.net/my_bashrc_aliases_profile_and_other_stuff/ -if [ -e /home/andrejus/.nix-profile/etc/profile.d/nix.sh ]; then . /home/andrejus/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer diff --git a/files/.bashrc b/files/.bashrc index 58dfd7c..cf70f47 100644 --- a/files/.bashrc +++ b/files/.bashrc @@ -1,4 +1 @@ -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion - [ -f ~/.fzf.bash ] && source ~/.fzf.bash diff --git a/files/.config/fish/functions/nvm.fish b/files/.config/fish/functions/nvm.fish index 244dbb1..8da3971 100644 --- a/files/.config/fish/functions/nvm.fish +++ b/files/.config/fish/functions/nvm.fish @@ -1,3 +1,3 @@ function nvm - bax source $NVM_DIR/nvm.sh ';' nvm $argv + replay source $NVM_DIR/nvm.sh ';' nvm $argv end diff --git a/files/.profile b/files/.profile index 15dba21..d9919d7 100644 --- a/files/.profile +++ b/files/.profile @@ -1,10 +1,10 @@ -# U _____ u _ _ __ __ -# \| ___"|/| \ |"| \ \ /"/u -# | _|" <| \| |> \ \ / // -# | |___ U| |\ |u /\ V /_,-. -# |_____| |_| \_| U \_/-(_/ -# << >> || \\,-.// -# (__) (__)(_") (_/(__) +# U _____ u _ _ __ __ +# \| ___"|/| \ |"| \ \ /"/u +# | _|" <| \| |> \ \ / // +# | |___ U| |\ |u /\ V /_,-. +# |_____| |_| \_| U \_/-(_/ +# << >> || \\,-.// +# (__) (__)(_") (_/(__) # # set PATH so it includes user's private bin export PATH="$HOME/bin:$PATH" @@ -68,13 +68,13 @@ export FZF_COMPLETION_TRIGGER='**' # do not use fishlogin for subshells export SHELL=/bin/sh - # _ _ _ ____ -# U /"\ u |"| ___ U /"\ u / __"| u -# \/ _ \/ U | | u |_"_| \/ _ \/ <\___ \/ -# / ___ \ \| |/__ | | / ___ \ u___) | -# /_/ \_\ |_____| U/| |\u /_/ \_\ |____/>> -# \\ >> // \\.-,_|___|_,-.\\ >> )( (__) -# (__) (__)(_")("_)\_)-' '-(_/(__) (__)(__) + # _ _ _ ____ +# U /"\ u |"| ___ U /"\ u / __"| u +# \/ _ \/ U | | u |_"_| \/ _ \/ <\___ \/ +# / ___ \ \| |/__ | | / ___ \ u___) | +# /_/ \_\ |_____| U/| |\u /_/ \_\ |____/>> +# \\ >> // \\.-,_|___|_,-.\\ >> )( (__) +# (__) (__)(_")("_)\_)-' '-(_/(__) (__)(__) # alias vim='nvim' alias vi='vim' From 8b2296af578332520ba9b9d4e19c09cf81aaeb60 Mon Sep 17 00:00:00 2001 From: Andrejus Date: Fri, 19 Feb 2021 17:56:49 +0000 Subject: [PATCH 3/3] bump terraform version --- install/34-terraform.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/34-terraform.sh b/install/34-terraform.sh index cd4433b..42f3fc6 100755 --- a/install/34-terraform.sh +++ b/install/34-terraform.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash source "$(dirname $0)/utils.sh" -tf_version="0.13.5" +tf_version="0.14.6" if not_installed "terraform"; then echo "Installing terraform..." tf_archive="terraform_${tf_version}_linux_amd64.zip" @@ -16,7 +16,7 @@ fi echo "terraform is installed" terraform --version -tf_lsp_version="0.8.0" +tf_lsp_version="0.13.0" if not_installed "terraform-ls"; then echo "Installing terraform-ls..." tf_lsp_archive="terraform-ls_${tf_lsp_version}_linux_amd64.zip"