Live data from Hacker News

Migrating from GNU Stow to Chezmoi

rednafi.com

11–20 of 152 posts

Re: Migrating from GNU Stow to Chezmoi

#11
I hate . dirs. In fact, I hate them so much that I don't use them.

My configuration lives primarily in .yml files. These are kept super-simple. When need be and another format is required, ruby autogenerates these for me. For instance, all my bash aliases are kept in .yml files which then get turned into bash rc files or any other target format for other shells. Same for most of my other configuration too - not always .yml but usually some text file. I never understood the neet for .foobar directories or files. They just hide a system that is intrinsically ugly and needlessly complicated.

Re: Migrating from GNU Stow to Chezmoi

#12
post #8

I’ve always managed this problem in a different way. I don’t know if my way is better, but it works really well for me. I treat my powerful desktop computer as my main machine. Then I have a bunch of laptops. Then I just rsync my entire home directory out to all the laptops. From there. The rule is quite simple. Any file created on a laptop are considered ephemeral. If I create data that I have to keep. It gets rsync…

Interesting. I go about this differently. I have one master setting and from there ruby just autogenerates anything I'd ever need on other computers. If ruby is unavailable then I just copy the generated files. But I only edit the master setting to enable what I need.

> This process has served me well for at least 15 years now and is supported by a small handful of shell scripts to automate this process

I feel in a similar way but not with shell scripts. Ruby autogenerates them if I need them too. Ruby is my ultimate glue to hold together everything.

Re: Migrating from GNU Stow to Chezmoi

#13

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.

Re: Migrating from GNU Stow to Chezmoi

#14
post #7

It's great to manage your dotfiles, but I took it a step farther. I rebuilt the minimal Linux desktop environment of my dreams (startx, xinit, i3, i3status etc) with Ansible. It begins from a vanilla Ubuntu server 24.04.4 install. I bootstrapped it using a KVM + spice setup (using a spare physical SSD rather than a virtual one) and iterating over and over again until I finally got everything mostly working. I then bo…

don't want to be that guy, but have you tried nix?

Re: Migrating from GNU Stow to Chezmoi

#15

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.

Guix solves the same problem in similar ways, though it uses Scheme as its configuration language.

Re: Migrating from GNU Stow to Chezmoi

#16
Chezmoi strikes a nice balance between the overkill of home-manager while still being more powerful than simpler solutions.

Yadm is another alternative, the main thing I don't like about it though is that I'm not a fan of cross OS dotfiles. Having niri files on my work Mac and aerospace dotfiles on Linux annoys me quite a bit.

As powerful as the templating in chezmoi is, I think it should be considered a last resort and only used for simple files. They break your editor features like highlighting.

Re: Migrating from GNU Stow to Chezmoi

#17
post #15

Earlier quoted context omitted.

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.

Guix solves the same problem in similar ways, though it uses Scheme as its configuration language.

Sadly it doesn't work on macOS, unlike Nix.

Re: Migrating from GNU Stow to Chezmoi

#20
post #7

It's great to manage your dotfiles, but I took it a step farther. I rebuilt the minimal Linux desktop environment of my dreams (startx, xinit, i3, i3status etc) with Ansible. It begins from a vanilla Ubuntu server 24.04.4 install. I bootstrapped it using a KVM + spice setup (using a spare physical SSD rather than a virtual one) and iterating over and over again until I finally got everything mostly working. I then bo…

don't want to be that guy, but have you tried nix?

I tried GUIX a few times, but ultimately I couldn't quite get it working exactly the way I wanted it to work. I also didn't like the ugly filesystem layout that the store requires. I may get over it and revisit at some point. It will be a lot of work, but on the plus side I'll have a reason to learn scheme.
Post reply on HN