it's simultaneously awesome but "can I really recommend this to <colleague>?"
For example, here's a snippet pulled from my dotfiles that does this for multiple dotfiles at once:
home.file =
builtins.mapAttrs
(key: value: {
# symlink ~/dotfiles/configs/{value} to ~/{key}
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dotfiles/configs/${value}";
})
{
".zshrc" = "zsh/zshrc";
".p10k.zsh" = "zsh/p10k.zsh";
".config/sway/config" = "sway/config";
".config/nvim/init.lua" = "nvim/init.lua";
};At the same time it often feels like a veneer of control, like you can control exactly where to place the door, but what's in the messy room (like emacs profiles if you do that) might be hidden behind the very nice and solid door.
It's like in python projects I lock python3 and uv, and beyond that it's wild west. Still beats everything else, still feels a bit incomplete, and still feels somewhat unresolvable.
It depends on buy-in from the tool so it’s not a panacea but it works for my use cases at least. I also don’t like to switch config for every change and it turns out I rarely have to.
Nix is definitely The Way to solve this problem, but I wouldn’t recommend it if the only thing you’ll ever use it for is home-manager. Once you’ve paid the investment, though… I never want to rsync a dotfile ever again in my life.
I really appreciate and use nixpkgs+nix-darwin as well as NixOS and flakes and per-project nix-shell/nix develop through and through; even then, Home Manager is a bridge too far for me.
One of the features of my dotfiles setup is that it has zero dependencies (beyond a POSIX shell).