3 ms·
Yes, it does. https://yadm.io/docs/alternates# https://yadm.io/docs/alternates# I used yadm for a while. I switched to Chezmoi (https://www.chezmoi.io https://
by cweagans 2y ago
Yes, it does. https://yadm.io/docs/alternates# https://yadm.io/docs/alternates#
I used yadm for a while. I switched to Chezmoi (https://www.chezmoi.io https://www.chezmoi.io) though. Same ideas, but much better execution IMO.
- snthpy 2y agoI'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...).
- snapplebobapple 2y agoDid chezmoi make it easy to edit and then add fileswith changes?i hated always having to chezmoi this and that rather than doing what i want then runn*ng yadm -u to pick up all the changes in my tracked files
- cweagans 2y agoPretty sure there are a couple of aliases that you could create to get you the workflow you want. I just edit my files on disk, chezmoi add file, then periodically fit commit and push them. You could create a post add hook to automatically git add/commit/push + I’m reasonably sure there’s a chezmoi command to list all tracked files, so you could iterate through all of them and do whatever you want with them.