From 8ebf894650967b360156c3e64806c76797165945 Mon Sep 17 00:00:00 2001 From: Mika Vilpas Date: Sat, 13 Jun 2026 17:38:30 +0300 Subject: [PATCH] refactor!: drop stow and manage dotfiles with mise mise v2026.6.6 has added an experimental dotfiles feature: - https://github.com/jdx/mise/releases/tag/v2026.6.6 - https://github.com/jdx/mise/pull/10376 Try it out and drop stow completely. Benefits: - fewer tools to manage - stow's blocklist may lead to dangerous surprises - an allowlist is much safer (even though it's more annoying to maintain) - the list of symlinks is easier to keep in sync with the list of tools since they are in the same file now --- .config/mise/config.toml | 37 +++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 18 +++++------------- .stow-local-ignore | 24 ------------------------ readme.md | 10 ++++------ 4 files changed, 46 insertions(+), 43 deletions(-) delete mode 100644 .stow-local-ignore diff --git a/.config/mise/config.toml b/.config/mise/config.toml index c1fb96517..894aed78f 100644 --- a/.config/mise/config.toml +++ b/.config/mise/config.toml @@ -2,6 +2,43 @@ settings.cargo.binstall = true settings.cargo.binstall_only = true settings.experimental = true +settings.dotfiles.root = "~/dotfiles" +settings.dotfiles.default_mode = "symlink" + +[dotfiles] +# ~/.npmrc is intentionally NOT managed here: the real ~/.npmrc holds secret +# authTokens that must never be committed, and the repo .npmrc only sets the +# default registry (which npm uses anyway). Leave the home file untouched. + +# List everything explicitly. This is annoying but clear, and avoids bad +# surprises completely. +# +# Manage with: +# $ mise dotfiles apply --dry-run + +"~/.config/aerospace" = {} +"~/.config/atuin" = {} +"~/.config/bat" = {} +"~/.config/delta" = {} +"~/.config/fd" = {} +"~/.config/fish" = {} +"~/.config/glow" = {} +"~/.config/husky" = {} +"~/.config/lazygit" = {} +"~/.config/mise" = {} +"~/.config/nvim" = {} +"~/.config/presenterm" = {} +"~/.config/starship.toml" = {} +"~/.config/wezterm" = {} +"~/.config/yazi" = {} +"~/.fdignore" = {} +"~/.gitattributes" = {} +"~/.gitconfig" = {} +"~/.rgignore" = {} +"~/.typos.toml" = {} +"~/.zshrc" = {} +"~/Library/Application Support/org.dystroy.bacon" = {} + # Pick tools that renovate can manage updates for. See: # https://docs.renovatebot.com/modules/manager/mise/ [tools] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9baa067b7..4980f1f6f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,19 +34,6 @@ jobs: with: persist-credentials: false - - name: Install GNU stow and setup the dotfiles - run: | - sudo apt-get install stow tree - pwd - ls -la - echo "Installing dotfiles to HOME $HOME" - stow --verbose 2 . --target="$HOME" - echo "Installed dotfiles to HOME $HOME" - echo "List files in HOME" - ls -la ~/ - echo "List files in ~/.config" - ls -la ~/.config/ - - name: Setup the mold linker uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 @@ -81,6 +68,11 @@ jobs: github:dandavison/delta lazygit@${{ env.LAZYGIT_VERSION }} + - name: Symlink the dotfiles with mise + run: mise dotfiles apply --verbose --yes + env: + MISE_DOTFILES_ROOT: ${{ github.workspace }} + - name: Build run: cargo install --locked --path scripts/ working-directory: scripts diff --git a/.stow-local-ignore b/.stow-local-ignore deleted file mode 100644 index b61f520e3..000000000 --- a/.stow-local-ignore +++ /dev/null @@ -1,24 +0,0 @@ -# note: trailing slashes are not supported -.gitmodules -.git -.wezterm.sh -node_modules -package.json -package-lock.json -.gitignore -.prettierignore -.prettierrc.yml -.nvmrc -assets -readme.md -taplo.toml -integration-tests -eslint.config.mjs -pnpm-lock.yaml -pnpm-workspace.yaml -scripts -.bacon-locations -.mise.ci.toml -.release-please-manifest.json - -# vim: set filetype=gitignore : diff --git a/readme.md b/readme.md index 73740f549..fb66987e5 100644 --- a/readme.md +++ b/readme.md @@ -38,20 +38,18 @@ Here are the basics: ### Dotfile management -I manage my dotfiles with GNU Stow. It creates symlinks from the repository to -the home directory. See -[how-i-manage-my-dotfiles-using-gnu-stow](https://dev.to/spacerockmedia/how-i-manage-my-dotfiles-using-gnu-stow-4l59) -for an introduction by Shawn McElroy. +I manage my dotfiles with [mise](https://mise.jdx.dev/). It creates symlinks +from the repository to the home directory. This way I can keep the configuration under version control and still have it in the home directory. ```sh # Sync the dotfiles (practice run) -stow --verbose 2 . --simulate +mise dotfiles apply --dry-run # Really sync the dotfiles -stow --verbose 2 . +mise dotfiles apply ``` ### Dependency management