Live data from Hacker News

Migrating from GNU Stow to Chezmoi

rednafi.com

21–30 of 152 posts

Re: Migrating from GNU Stow to Chezmoi

#21

I had similar problems with GNU Stow, but switched to Nix and Home Manager instead. I think Chezmoi's templates and file naming conventions don't click for me, but it's nice to see a good variety in this problem space.

I didn't even know that managing dotfiles was a "problem space".

Re: Migrating from GNU Stow to Chezmoi

#23
Switched to Chezmoi from random assortment of manually authored scripts. The workflow takes some getting used to, because I constantly edit the actual files without calling `chezmoi edit` first, and have to merge.

I like that when combined with `mise` (https://mise.jdx.dev) I can roll out a new computer in 2-3 commands and have my entire environment configured the way I like, with neovim and all the plugins and language servers.

Re: Migrating from GNU Stow to Chezmoi

#24
post #21

I had similar problems with GNU Stow, but switched to Nix and Home Manager instead. I think Chezmoi's templates and file naming conventions don't click for me, but it's nice to see a good variety in this problem space.

I didn't even know that managing dotfiles was a "problem space".

Even just as a user of nix there has been this problem of how to manage dotfiles - people have git repositories for them but they are copies, because the actual dotfile in use is never tracked

For a System administrator the problem is many orders of magnitude worse

Re: Migrating from GNU Stow to Chezmoi

#25

Switched to Chezmoi from random assortment of manually authored scripts. The workflow takes some getting used to, because I constantly edit the actual files without calling `chezmoi edit` first, and have to merge. I like that when combined with `mise` ( https://mise.jdx.dev ) I can roll out a new computer in 2-3 commands and have my entire environment configured the way I like, with neovim and all the plugins and lan…

[deleted]

Re: Migrating from GNU Stow to Chezmoi

#27

I had similar problems with GNU Stow, but switched to Nix and Home Manager instead. I think Chezmoi's templates and file naming conventions don't click for me, but it's nice to see a good variety in this problem space.

People shy from Nix because of supposed complexity but it really is the only real solution to this sort of problem. It's not really that much more difficult to learn, and in fact if you are willing, AI works really well generating nix config.

It took me a single afternoon to learn the basics and start using it. Contrary to what I initially thought, I didn't have to migrate all of my dotfiles at once. Then over the next couple of days, Codex migrated everything else for me.

One major benefit for me is that I no longer need to have once-in-a-while tools installed, because I can always spin up a temporary shell with `nix-shell -p packageName`. This significantly decreased the amount of software I have in my environment.

This works great with agentic coding. Agent wants to run `ripgrep`, but you don't have it? Tell it to run `nix run nixpkgs#ripgrep` instead.

But the biggest benefit is that now that you know Nix! So you can start using it to create reproducible development environments and uninstall mise, asdf, nvm, pyenv, etc. You can spin up reproducible servers running NixOS and never touch Ansible again. You can even install it in your router.

Or you can do none of that and continue just using it for your dotfiles. It plays nice with other tools.

Re: Migrating from GNU Stow to Chezmoi

#28
It’s quite new but I’ve been cooking up some new bootstrapping features with mise which people may find relevant here: https://mise.jdx.dev/bootstrap.html

It’s for things like dotfiles, apt/brew packages, and LaunchAgents/systemd.

EDIT: I feel a little bad having hijacked this, as someone that hears a lot of opinions about devtools I can definitely say chezmoi is a darling of the community and I highly recommend checking it out.

Re: Migrating from GNU Stow to Chezmoi

#29
post #6

I've been using [yadm]( https://yadm.io/ ) instead which works really well!

I've been happy with yadm for few years now. I had tried chezmoi, but preferred yadm. I don't remember my exact reasons though...

I looked at Stow and Chezmoi and also have stuck with YADM. The exact reason is that YADM is so simple and intuitive because it's basically Git-for-dotfiles with so little to learn. Yet it also manages to support alternate and template files.

Re: Migrating from GNU Stow to Chezmoi

#30

I had similar problems with GNU Stow, but switched to Nix and Home Manager instead. I think Chezmoi's templates and file naming conventions don't click for me, but it's nice to see a good variety in this problem space.

People shy from Nix because of supposed complexity but it really is the only real solution to this sort of problem. It's not really that much more difficult to learn, and in fact if you are willing, AI works really well generating nix config.

It's not complexity its questionable documentation. Picking up Nix is really hard yet the best we got is a mishmash of unofficial recourses and many of them are out of date and/or focus on the packaging side which is terrible for introduction.
Post reply on HN