Why did this not occur to me previously? For any package which can be configured using a file in $HOME/.config, you can alternatively put that file in any directory in $XDG_CONFIG_DIRS

Which means you can write a derivation for it that drops the file in $out/etc/xdg

https://github.com/telent/config-nixpkgs/blob/master/pkgs/alacritty-yml/default.nix

telent/config-nixpkgs

My .config/nixpkgs directory. Contribute to telent/config-nixpkgs...

GitHub