So here’s my use case. I have this in my HomeManager config:
{
home.file.".config/i3/config".source = ../dotfiles/i3;
}
… where dotfiles/i3
is ~300 lines of i3 config.
Now inside this i3 config I’d like to reference nix packages, and other configurations (e.g. home dir, wallpaper, …). But since it’s 300+ lines I don’t want to inline the whole config into the nix file.
I currently use substituteAll
, but I dislike it a lot, I think it’s hacky and messy, it has a lot of weird foot gun behavior, and I dislike that I have to declare every single substitution by hand (e.g. I can’t just pass in pkgs
and then reference pkgs.feh
, instead I have to declare every single package). (Apparently others think so too).
Are there any alternatives to this?