changeset 1100:ff1fe85fc5bb draft

feat: install devtools via mise globally
author Zeger Van de Vannet <zeger@vandevan.net>
date Tue, 01 Jul 2025 20:12:46 +0200
parents 1d163e43854a
children 262c2f89dac5
files .chezmoiremove .chezmoiscripts/run_onchange_after_16-install-mise-and-plugins.sh.tmpl .chezmoiscripts/run_onchange_after_22-install-devtools.sh.tmpl dot_config/mise/config.toml dot_tool-versions
diffstat 5 files changed, 15 insertions(+), 55 deletions(-) [+]
line wrap: on
line diff
--- a/.chezmoiremove	Mon May 19 20:56:09 2025 +0200
+++ b/.chezmoiremove	Tue Jul 01 20:12:46 2025 +0200
@@ -1,3 +1,4 @@
 ~/.config/nvim/plugin/config.vim
 ~/.zsh/fzf-tab/
 ~/.asdf/
+~/.tool-versions
--- a/.chezmoiscripts/run_onchange_after_16-install-mise-and-plugins.sh.tmpl	Mon May 19 20:56:09 2025 +0200
+++ b/.chezmoiscripts/run_onchange_after_16-install-mise-and-plugins.sh.tmpl	Tue Jul 01 20:12:46 2025 +0200
@@ -3,8 +3,8 @@
 
 set -xe
 
-# tool-versions hash: {{ include "dot_tool-versions" | sha256sum }}
-{{ $version := "2025.5.6" }}
+# tool-versions hash: {{ include "dot_config/mise/config.toml" | sha256sum }}
+{{ $version := "2025.6.8" }}
 
 
 {{ $arch := "x64" }}
@@ -22,8 +22,10 @@
 $RTX_BIN install --verbose --yes
 
 mkdir -p $XDG_CONFIG_HOME/direnv/lib
-$RTX_BIN direnv activate > $XDG_CONFIG_HOME/direnv/lib/use_rtx.sh
-$RTX_BIN completion zsh > ~/.zsh/completetions
+FISH_COMPLETIONS=$HOME/.config/fish/completions
+$RTX_BIN completion fish > $FISH_COMPLETIONS/mise.fish
+$RTX_BIN exec ripgrep -- rg --generate=complete-fish > $FISH_COMPLETIONS/rg.fish
+$RTX_BIN exec fd -- fd --gen-completions fish > $FISH_COMPLETIONS/fd.fish
 
 
 {{ end }}
--- a/.chezmoiscripts/run_onchange_after_22-install-devtools.sh.tmpl	Mon May 19 20:56:09 2025 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-{{ if (and (eq .chezmoi.os "linux") (or (eq .chezmoi.osRelease.name "Ubuntu" ) (eq .chezmoi.osRelease.name "Fedora Linux Asahi Remix" ))) -}}
-#!/usr/bin/env bash
-{{ $packages := dict
-  "fd"        (dict "version" "10.2.0"  "url" "https://github.com/sharkdp/fd/releases/download/v${VERSION}/fd-v${VERSION}-${PKG_ARCH}-unknown-linux-${PKG_LIBC}.tar.gz" "arch" ((eq .chezmoi.arch "arm64") | ternary "aarch64" "i686") )
-  "rg"        (dict "version" "14.1.1" "url" "https://github.com/BurntSushi/ripgrep/releases/download/${VERSION}/ripgrep-${VERSION}-${PKG_ARCH}-unknown-linux-${PKG_LIBC}.tar.gz" "arch" ((eq .chezmoi.arch "arm64") | ternary "aarch64" "x86_64") )
-  "hyperfine" (dict "version" "1.19.0" "url" "https://github.com/sharkdp/hyperfine/releases/download/v${VERSION}/hyperfine-v${VERSION}-${PKG_ARCH}-unknown-linux-${PKG_LIBC}.tar.gz" "arch" ((eq .chezmoi.arch "arm64") | ternary "aarch64" "x86_64") ) -}}
-
-set -xe
-
-DOWNLOAD_DIR=${TMPDIR:-/tmp}/devtools
-INSTALL_DIR=$HOME/bin
-export MANPAGE_DIR=$HOME/.local/man
-
-mkdir -p $MANPAGE_DIR
-
-mkdir -p $DOWNLOAD_DIR
-pushd $DOWNLOAD_DIR
-
-{{ if (eq .chezmoi.arch "arm64") -}}
-PKG_LIBC="gnu"
-{{ else -}}
-PKG_LIBC="musl"
-{{ end }}
-{{ range keys $packages | sortAlpha }}
-{{ $meta :=  get $packages . -}}
-VERSION={{ get $meta "version" }}
-PKG_ARCH={{ get $meta "arch" }}
-echo "Downloading {{ . }} v{{ get $meta "version" }} ..."
-curl -fsSL {{ get $meta "url" }} | tar --strip-components=1 -xz
-install -m 755 $DOWNLOAD_DIR/{{ . }} $INSTALL_DIR/{{ . }}
-{{ end }}
-
-find . -name "*.1" | xargs -I {} sh -c 'install {} "$MANPAGE_DIR/$(basename {})"'
-
-popd
-rm -rf $DOWNLOAD_DIR
-
-FISH_COMPLETIONS=$HOME/.config/fish/completions
-$INSTALL_DIR/rg --generate=complete-fish > $FISH_COMPLETIONS/rg.fish
-$INSTALL_DIR/fd --gen-completions fish > $FISH_COMPLETIONS/fd.fish
-
-{{ end }}
--- a/dot_config/mise/config.toml	Mon May 19 20:56:09 2025 +0200
+++ b/dot_config/mise/config.toml	Tue Jul 01 20:12:46 2025 +0200
@@ -1,7 +1,12 @@
 [settings]
+idiomatic_version_file_enable_tools = ["python"]
 
-[settings.python]
-compile = true
 
 [tools]
-direnv = "latest"
+chezmoi = "latest"
+direnv = "2.32.1"
+fd = "latest"
+hyperfine = "latest"
+python = "3.10.7"
+ripgrep = "latest"
+rust = "1.88.0"
--- a/dot_tool-versions	Mon May 19 20:56:09 2025 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-python 3.10.7
-direnv 2.32.1
-rust 1.74.0
-sqlite 3.39.4
-nodejs 19.2.0
-chezmoi 2.42.2