4 ms·
I'm surprised by this because I find the chezmoi workflow very annoying, to the extent that I wrote my own thing (see my other comment). Where did you find yad
by snthpy 2y ago
I'm surprised by this because I find the chezmoi workflow very annoying, to the extent that I wrote my own thing (see my other comment).
Where did you find yadm fall short?
- cweagans 2y agoThe workflow that you show in your repository is really not that different from Chezmoi. If you configure a post-add hook in Chezmoi (https://www.chezmoi.io/reference/configuration-file/hooks/ https://www.chezmoi.io/reference/configuration-file/hooks/), you can do `chezmoi add ~/.config/whatever/whatever.conf` and have the file auto-added to the Chezomi git repo + push it to some remote if you'd like. yadm made it difficult for me to take specific actions when a file changed. For example, I configure a lot of macOS settings in my dotfiles (https://github.com/cweagans/dotfiles/tree/main/dot_config/macos https://github.com/cweagans/dotfiles/tree/main/dot_config/ma...). When any of the JSONC files change, I need to run a script to actually apply them (https://github.com/cweagans/dotfiles/blob/main/.chezmoiscripts/darwin/run_once_after_install_defaults.sh.tmpl https://github.com/cweagans/dotfiles/blob/main/.chezmoiscrip...), but I don't want to do that unconditionally. Chezmoi tracks that state for me and only runs the script when needed. Ditto with the macOS config profile (https://github.com/cweagans/dotfiles/blob/main/dot_config/macos/private_profiles/private_macos.mobileconfig.tmpl https://github.com/cweagans/dotfiles/blob/main/dot_config/ma... and https://github.com/cweagans/dotfiles/blob/main/.chezmoiscripts/darwin/run_once_after_install_macos_profile.sh.tmpl https://github.com/cweagans/dotfiles/blob/main/.chezmoiscrip... respectively). I was also not thrilled about the idea of shipping an encrypted blob of important secrets around. I want my dotfiles to be public, so it's much nicer when the tool I use for managing my dotfiles natively integrates with 1password. Much of the templating functionality that I use from chezmoi is specifically for pulling stuff out of 1password. Finally, the yadm "alternate files" functionality is nice, but I didn't really care about alternates for different OSes or hostnames or whatever. I wanted some configuration for my work machine(s) and some configuration for my personal machine(s) - that's it. That's the only distinction I care about. Chezmoi made it easy to prompt for the type of machine + change the things that get configured accordingly when bootstrapping a new machine (https://github.com/cweagans/dotfiles/blob/main/.chezmoi.toml.tmpl#L2-L4 https://github.com/cweagans/dotfiles/blob/main/.chezmoi.toml...).