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.
[flagged]
Migrating from GNU Stow to Chezmoi
71–80 of 152 posts
Re: Migrating from GNU Stow to Chezmoi
#72I 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".
* Permission management, so that ssh wouldn't refuse to log you in because ~/.ssh/authorized_keys is 0755 instead of 0644.
* Templating, because ~/.ssh/config has slightly different options on Mac and Linux, so you can't use the exact same file contents as-is on both systems.
I can run `chezmoi apply` and get all the files in the right places and they're all setup just right. Like so many others, I'd previously built my own ad-hoc system to handle these things, and it ended up looking like a crappy, half-baked version of Chezmoi. When it came up on my radar I immediately ported my own system over to it and never looked back.
Re: Migrating from GNU Stow to Chezmoi
#73Earlier quoted context omitted.
[flagged]
What a snakepit of a comment! I know there are tensions within nix but this feels like a classic case of Chestertons fence at a big scale.
Re: Migrating from GNU Stow to Chezmoi
#74Earlier quoted context omitted.
I am genuinely confused. Are you saying dotfile managers need to be more complex? Or that nix's problem space is the only solution for the things in nix's domain? (of which dotfiles are just one—via home manager) I thought it was the former but "just pulling a precompiled, dynamically linked binary and hoping it works" makes me think we're not on the same page since to me that has nothing to do with dotfiles.
I'm saying that I value the completeness (thoroughness may be a better word) as well as the reproducability and portability that nix ensures over convenience. I cant tell you the amount of times I've pulled a precompiled tool and it just doesnt work because of one quirk of their packaging or another. Also noting that I don't see the problem as "dotfile management" but as "system AND user configuration management" whi…
This is a serious problem in Nix too. I often trip over buggy and abandoned Nix packages. Nix often makes it easy to roll back or work around them, but they're absolutely there.
Re: Migrating from GNU Stow to Chezmoi
#75I 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.
If you like home manager but also like to understand how your "home"/user programs are configured, take a look at hjem!
I don't understand what makes it more understandable than Home Manager, though.
If you look at the source of a Home Manager `programs.foo` module, it should look mostly like this:
home.packages = [ cfg.package ];
xdg.configFile."foo/config.yaml".source = yamlFormat.generate "config.yaml" cfg.settings;
Which is pretty much exactly the same syntax you get with Hjem, but with more optional features. So you could just write that instead whenever you want full control :)Re: Migrating from GNU Stow to Chezmoi
#76Earlier quoted context omitted.
I've bounced off Nix every time I tried it, before I even started trying something like Home Manager. I've been using (and contributing to) chezmoi for ~6 years now. Given that it has first-class integration with secrets managers, I suspect that it does things that Home Manager can't.
>I've bounced off Nix every time I tried it, before I even started trying something like Home Manager. I did too. Until I tried configuring it with Claude Code. I'll give you my money back guarantee on it.
Re: Migrating from GNU Stow to Chezmoi
#77Re: Migrating from GNU Stow to Chezmoi
#78Earlier quoted context omitted.
If you like home manager but also like to understand how your "home"/user programs are configured, take a look at hjem!
Last time I looked, it only worked with NixOS. I don't understand what makes it more understandable than Home Manager, though. If you look at the source of a Home Manager `programs.foo` module, it should look mostly like this: home.packages = [ cfg.package ]; xdg.configFile."foo/config.yaml".source = yamlFormat.generate "config.yaml" cfg.settings; Which is pretty much exactly the same syntax you get with Hjem, but wi…
With some programs it is as simple as you show, but with others there are options around the config and other nix module nasties that I avoid if I can. hjem-rum is a sister project to hjem that provides some similar modules.
Re: Migrating from GNU Stow to Chezmoi
#79Now I want to use Nix* to manage my multi-machine MacOS and Linux setup (with lots of dotfile config overlap, of course).
That’s the HN experience for you.
Kind souls: what is currently the blessed way to manage MacOS dots with Nix? I recall there is more than one paradigm - what’s the approach that simplest, most robust and can be adopted incrementally?
Edit: Just to say that I think Atuin now also plays in this space. Haven’t checked it out, though.
Re: Migrating from GNU Stow to Chezmoi
#80It’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 chec…
I am quite intrigued. With the sorry state of security, I am doing everything in VMs and have been trying to settle on the best way to setup a new machine. The process is so clunky that I end up defaulting to bigger instances than I should (more pets than cattle). Being able to centralize this config is far more attractive than having a separate Ansible or pyinfra process. Edit: The docs on this are very encouraging!…
I’d argue it’s a good time to play with features since if you have any ideas on how it might better fit your workflow I still have the ability to change the design before it’s largely frozen.