Compare commits

..

21 Commits

Author SHA1 Message Date
223555c852 feat: add config for chezmoi 2025-06-24 01:13:40 +02:00
3aeb0650c4 feat: Install chezmoi with mise 2025-06-24 00:53:41 +02:00
10015173f9 feat: deprecate some tools to keep only mise 2025-06-24 00:26:01 +02:00
6462e4ce57 feat: Switch config for astronvim to main branch 2025-03-22 16:04:59 +01:00
ed63fce4c0 feat: Allow to run script from outside ~/.bootstrap directory 2025-01-25 19:05:28 +01:00
575f7c5e6f feat: Add nix in tools.d 2025-01-25 18:44:44 +01:00
cd86866863 feat: improve nvim configuration management 2025-01-25 18:44:15 +01:00
8745971e50 feat: improve tmux configuration management 2025-01-25 18:44:01 +01:00
7295fd6057 chore: shellcheck 2024-12-20 08:49:13 +00:00
a8ec6b83e2 feat: improve git configuration 2024-12-20 08:46:28 +00:00
ceb4daf128 feat: create dedicated os.d dir for os specific install 2024-12-20 08:36:00 +00:00
6848c459f7 feat: move anyenv to tools.d dir 2024-12-20 08:35:00 +00:00
c228c08ad8 chore: shellcheck 2024-06-21 16:59:09 +00:00
8694d7f356 feat: Ajout fichiers mise à ~/.gitignore 2024-06-21 16:58:49 +00:00
867123079e fix: fix mise tool installation 2024-06-21 08:55:38 +00:00
b517be3168 feat: update git repo url to point to self-hosted gitea 2024-06-21 08:49:05 +00:00
6cfdf3d893 feat: add new tool mise-en-place (https://mise.jdx.dev/) 2024-06-13 10:33:13 +02:00
16a3d01993 feat: improve git config with global gitignore 2024-06-13 10:32:07 +02:00
f247a375d8 feat: move bash config to config.d 2024-06-13 10:31:44 +02:00
972d7c2390 feat: switch broot installation to asdf 2024-03-18 18:17:35 +00:00
cdaf7453d0 fix: fix lsd source for asdf 2024-03-18 18:17:15 +00:00
20 changed files with 151 additions and 55 deletions

View File

@ -3,5 +3,5 @@
Just a script to easily setup my shell environment on new devices.
```
git clone https://github.com/xlogerais/config-bootstrap.git ~/.bootstrap && cd ~/.bootstrap && bash bootstrap.bash
git clone https://gitea.logerais.com/xavier/config-bootstrap.git ~/.bootstrap && cd ~/.bootstrap && bash bootstrap.bash
```

View File

@ -1,6 +1,8 @@
#!/bin/bash
bash system-ubuntu.bash
bash tools.bash
bash fonts.bash
bash config.bash
BASEDIR=$(cd "$(dirname "$0")" && pwd)
bash "${BASEDIR}/os.bash"
bash "${BASEDIR}/tools.bash"
bash "${BASEDIR}/fonts.bash"
bash "${BASEDIR}/config.bash"

View File

@ -1,15 +1,7 @@
#!/bin/bash
# Configuration BASH
BASEDIR=$(cd "$(dirname "$0")" && pwd)
if [[ ! -d ~/.bash ]]
then
git clone --recursive https://github.com/xlogerais/config-bash.git ~/.bash
bash ~/.bash/create-links.bash
fi
for file in config.d/*.bash
do
bash $file
for file in "${BASEDIR}"/config.d/*.bash; do
bash "${file}"
done

9
config.d/bash.bash Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
# Configuration BASH
if [[ ! -d ~/.bash ]]
then
git clone --recursive https://gitea.logerais.com/xavier/config-bash.git ~/.bash
bash ~/.bash/create-links.bash
fi

15
config.d/chezmoi.bash Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
# Configuration for chezmoi
# git_repo="https://github.com/AstroNvim/template"
# git_branch="main"
git_repo="https://gitea.cloud.logerais.com/xavier/config-chezmoi.git"
git_branch="main"
if (command -v chezmoi); then
chezmoi init https://gitea.cloud.logerais.com/xavier/config-chezmoi.git
chezmoi apply ~/.config/mise
mise install
fi

View File

@ -4,5 +4,26 @@
git config --global user.name "Xavier Logerais"
git config --global user.email "xavier@logerais.com"
git config --global rerere.enabled 1
git config --global credential.helper cache
git config --global merge.conflictstyle diff3
git config --global rerere.enabled 1
cat <<EOF >~/.gitignore
### asdf ###
.tool-versions
### mise ###
.mise.toml
### direnv ###
.direnv
.envrc
### python ###
.venv
EOF
cat <<EOF >~/.gitattributes
EOF
git config --global core.excludesfile ~/.gitignore
git config --global core.attributesfile ~/.gitattributes

View File

@ -1,10 +1,17 @@
#!/bin/bash
# Configuration NVIM
# Configuration for neovim
if [[ ! -d ~/.config/nvim ]]
then
git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim
nvim +PackerSync
# git_repo="https://github.com/AstroNvim/template"
# git_branch="main"
git_repo="https://gitea.cloud.logerais.com/xavier/config-astronvim.git"
git_branch="main"
config_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nvim
if [[ ! -d "${config_dir}" ]]; then
git clone "${git_repo}" --branch "${git_branch}" "${config_dir}"
nvim --headless +q
else
cd "${config_dir}" && git pull
fi

View File

@ -4,6 +4,6 @@
if [[ ! -d ~/.screen ]]
then
git clone --recursive https://github.com/xlogerais/config-screen.git ~/.screen
git clone --recursive https://gitea.logerais.com/xavier/config-screen.git ~/.screen
bash ~/.screen/create-links.bash
fi

View File

@ -1,9 +1,13 @@
#!/bin/bash
# Configuration TMUX
# Configuration for tmux
if [[ ! -d ~/.tmux ]]
then
git clone --recursive https://github.com/xlogerais/config-tmux.git ~/.tmux
bash ~/.tmux/create-links.bash
git_repo="https://gitea.cloud.logerais.com/xavier/config-tmux.git"
git_branch="master"
config_dir=${XDG_CONFIG_HOME:-$HOME/.config}/tmux
if [[ ! -d "${config_dir}" ]]; then
git clone "${git_repo}" --branch "${git_branch}" "${config_dir}"
else
cd "${config_dir}" && git pull
fi

View File

@ -4,7 +4,7 @@
if [[ ! -d ~/.vim ]]
then
git clone --recursive https://github.com/xlogerais/config-vim.git ~/.vim
git clone --recursive https://gitea.logerais.com/xavier/config-vim.git ~/.vim
bash ~/.vim/create-links.bash
fi

View File

@ -19,21 +19,23 @@ tools+=(vault)
tools+=(terraform terragrunt)
tools+=(ripgrep exa bat dust delta)
for tool in "${tools[@]}"
do
echo
echo "-- Installing ${tool}"
asdf plugin add ${tool}
asdf install ${tool} latest
asdf global ${tool} latest
for tool in "${tools[@]}"; do
echo
echo "-- Installing ${tool}"
asdf plugin add ${tool}
asdf install ${tool} latest
asdf global ${tool} latest
done
# Configure asdf/direnv integration
asdf direnv setup --shell bash --version latest
# Install extra plugins and tools
# lsd
echo
echo "-- Installing lsd"
asdf plugin add lsd https://github.com/argylelabcoat/asdf-lsd.git
asdf plugin add lsd https://github.com/mise-plugins/asdf-lsd/
asdf install lsd latest
asdf global lsd latest
@ -43,3 +45,10 @@ echo "-- Installing mcfly"
asdf plugin add mcfly https://github.com/barolab/asdf-mcfly.git
asdf install mcfly latest
asdf global mcfly latest
# Broot
echo
echo "-- Installing broot"
asdf plugin add broot https://github.com/cmur2/asdf-broot.git
asdf install broot latest
asdf global broot latest

View File

@ -1,6 +1,6 @@
# FONTS
fontdir="$HOME/.local/share/fonts"
fontdir="${HOME}/.local/share/fonts"
declare -a fonts
fonts+=("Inconsolata")
@ -12,10 +12,9 @@ fonts+=("DejaVuSansMono")
test -d "${fontdir}" || mkdir -p "${fontdir}"
# Download fonts
for font in "${fonts[@]}"
do
wget -q -O /tmp/${font}.zip "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${font}.zip" && cd ${fontdir} && unzip -u /tmp/${font}.zip && rm /tmp/${font}.zip
for font in "${fonts[@]}"; do
wget -q -O "/tmp/${font}.zip" "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${font}.zip" && cd "${fontdir}" && unzip -u "/tmp/${font}.zip" && rm "/tmp/${font}.zip"
done
# Refresh cache
fc-cache --force --verbose ${fontdir}
fc-cache --force --verbose "${fontdir}"

15
optional.d/nix.bash Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
# Install nix (with the nix-installer tool from DeterminateSystems)
# (See https://github.com/DeterminateSystems/nix-installer)
if ( ! command -v nix &> /dev/null ); then
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
fi
# Install home-manager
if (command -v nix-channel && command -v nix-shell &> /dev/null ); then
nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager
nix-channel --update
nix-shell '<home-manager>' -A install
fi

7
os.bash Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
BASEDIR=$(cd "$(dirname "$0")" && pwd)
for file in "${BASEDIR}"/os.d/*.bash; do
bash "${file}"
done

View File

@ -1,11 +1,10 @@
#!/bin/bash
if ( grep -q Ubuntu <(lsb_release -i) )
then
if (grep -q Ubuntu <(lsb_release -i)); then
sudo apt update
sudo apt upgrade -y
sudo apt install -y coreutils grep less tar tree
sudo apt install -y coreutils grep less tar zip unzip tree
sudo apt install -y man manpages-fr manpages-fr-extra
sudo apt install -y bash zsh fish
sudo apt install -y screen tmux

View File

@ -1,6 +1,7 @@
#!/bin/bash
for file in tools.d/*.bash
do
bash $file
BASEDIR=$(cd "$(dirname "$0")" && pwd)
for file in "${BASEDIR}"/tools.d/*.bash; do
bash "${file}"
done

View File

@ -1,5 +0,0 @@
#!/bin/bash
# broot
test -d ~/.local/bin || mkdir -p ~/.local/bin
test -x ~/.local/bin/broot || wget -O ~/.local/bin/broot "https://dystroy.org/broot/download/x86_64-linux/broot"

21
tools.d/mise.bash Normal file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# mise-en-place (https://mise.jdx.dev/)
# Install mise
if (! command -v mise &>/dev/null); then
curl https://mise.run | sh
fi
# Activate mise
test -x ~/.local/bin/mise && eval "$(~/.local/bin/mise activate bash)"
# Configure mise
#
mise settings set experimental true
# Install some essential tools
(mise where usage &>/dev/null) || mise use -g usage # for completion
(mise where chezmoi &>/dev/null) || mise use -g chezmoi # to manage dotfiles