From 10015173f931726f2b1e976341c2e2f535fff3e3 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Tue, 24 Jun 2025 00:26:01 +0200 Subject: [PATCH 1/4] feat: deprecate some tools to keep only mise --- {tools.d => deprecated.d}/anyenv.bash | 0 {tools.d => deprecated.d}/asdf.bash | 0 {tools.d => deprecated.d}/powerline.bash | 0 {tools.d => optional.d}/nix.bash | 0 os.d/ubuntu.bash | 2 +- tools.d/mise.bash | 4 +++- 6 files changed, 4 insertions(+), 2 deletions(-) rename {tools.d => deprecated.d}/anyenv.bash (100%) rename {tools.d => deprecated.d}/asdf.bash (100%) rename {tools.d => deprecated.d}/powerline.bash (100%) rename {tools.d => optional.d}/nix.bash (100%) diff --git a/tools.d/anyenv.bash b/deprecated.d/anyenv.bash similarity index 100% rename from tools.d/anyenv.bash rename to deprecated.d/anyenv.bash diff --git a/tools.d/asdf.bash b/deprecated.d/asdf.bash similarity index 100% rename from tools.d/asdf.bash rename to deprecated.d/asdf.bash diff --git a/tools.d/powerline.bash b/deprecated.d/powerline.bash similarity index 100% rename from tools.d/powerline.bash rename to deprecated.d/powerline.bash diff --git a/tools.d/nix.bash b/optional.d/nix.bash similarity index 100% rename from tools.d/nix.bash rename to optional.d/nix.bash diff --git a/os.d/ubuntu.bash b/os.d/ubuntu.bash index 561126f..4acf608 100644 --- a/os.d/ubuntu.bash +++ b/os.d/ubuntu.bash @@ -4,7 +4,7 @@ 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 diff --git a/tools.d/mise.bash b/tools.d/mise.bash index 0cc7b91..7390e4d 100644 --- a/tools.d/mise.bash +++ b/tools.d/mise.bash @@ -2,7 +2,7 @@ # mise-en-place (https://mise.jdx.dev/) -# Install +# Install mise if (! command -v mise &>/dev/null); then curl https://mise.run | sh @@ -15,4 +15,6 @@ if (command -v mise &>/dev/null); then # Install some plugins (mise where usage &>/dev/null) || mise use -g usage # for completion # mise use -g cargo:ubi # to install binaries from Github release + + (mise where chezmoi &>/dev/null) || mise use -g chezmoi # to manage dotfiles fi -- 2.34.1 From 3aeb0650c476da242de95cd57285acbdabf62bd9 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Tue, 24 Jun 2025 00:53:41 +0200 Subject: [PATCH 2/4] feat: Install chezmoi with mise --- tools.d/mise.bash | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tools.d/mise.bash b/tools.d/mise.bash index 7390e4d..da01130 100644 --- a/tools.d/mise.bash +++ b/tools.d/mise.bash @@ -8,13 +8,22 @@ 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 +(mise where usage &>/dev/null) || mise use -g usage # for completion +(mise where &>/dev/null) || mise use -g usage # for completion + +# Install some essential tools if (command -v mise &>/dev/null); then - # Activate - eval "$(mise activate bash)" - mise settings set experimental true # Install some plugins (mise where usage &>/dev/null) || mise use -g usage # for completion - # mise use -g cargo:ubi # to install binaries from Github release (mise where chezmoi &>/dev/null) || mise use -g chezmoi # to manage dotfiles + + # mise use -g cargo:ubi # to install binaries from Github release fi -- 2.34.1 From 223555c852b1b3d41183d57ade88f12a44f82eeb Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Tue, 24 Jun 2025 01:08:12 +0200 Subject: [PATCH 3/4] feat: add config for chezmoi --- config.d/chezmoi.bash | 15 +++++++++++++++ tools.d/mise.bash | 12 ++---------- 2 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 config.d/chezmoi.bash diff --git a/config.d/chezmoi.bash b/config.d/chezmoi.bash new file mode 100644 index 0000000..65f4b46 --- /dev/null +++ b/config.d/chezmoi.bash @@ -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 diff --git a/tools.d/mise.bash b/tools.d/mise.bash index da01130..c65a3ed 100644 --- a/tools.d/mise.bash +++ b/tools.d/mise.bash @@ -15,15 +15,7 @@ test -x ~/.local/bin/mise && eval "$(~/.local/bin/mise activate bash)" # Configure mise # mise settings set experimental true -(mise where usage &>/dev/null) || mise use -g usage # for completion -(mise where &>/dev/null) || mise use -g usage # for completion # Install some essential tools -if (command -v mise &>/dev/null); then - # Install some plugins - (mise where usage &>/dev/null) || mise use -g usage # for completion - - (mise where chezmoi &>/dev/null) || mise use -g chezmoi # to manage dotfiles - - # mise use -g cargo:ubi # to install binaries from Github release -fi +(mise where usage &>/dev/null) || mise use -g usage # for completion +(mise where chezmoi &>/dev/null) || mise use -g chezmoi # to manage dotfiles -- 2.34.1 From c5e69a9be3147398fe9e3b5708202c1dc624e4e0 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Fri, 29 Aug 2025 02:25:32 +0200 Subject: [PATCH 4/4] feat(os): improve ubuntu.bash --- os.d/ubuntu.bash | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/os.d/ubuntu.bash b/os.d/ubuntu.bash index 4acf608..e68cfbe 100644 --- a/os.d/ubuntu.bash +++ b/os.d/ubuntu.bash @@ -1,6 +1,6 @@ #!/bin/bash -if (grep -q Ubuntu <(lsb_release -i)); then +if (grep -q Ubuntu <(lsb_release --id --short)); then sudo apt update sudo apt upgrade -y @@ -8,7 +8,8 @@ if (grep -q Ubuntu <(lsb_release -i)); then sudo apt install -y man manpages-fr manpages-fr-extra sudo apt install -y bash zsh fish sudo apt install -y screen tmux - sudo apt install -y openssh mosh - sudo apt install -y vim git #tig + sudo apt install -y git #tig + sudo apt install -y vim + sudo apt install -y openssh-server openssh-client mosh sudo apt install -y wget curl lftp fping mtr socat fi -- 2.34.1