Note that the configuration generated by Home Manager will be written to $XDG_CONFIG_HOME/dunst/dunstrc regardless. This allows using a mutable configuration file generated from the immutable one, useful in scenarios where live reloading is desired.
The home-manager-generated dunstrc contains a (very long) setting for icon_path. How could I get this value to be included automatically in the settings specified in services.dunst.configFile, while
I’m struggling to see how this would let me modify the config file and see the effect the modification has, without having to run home-manager switch (the live reloading requirement).
IIUC, you’re suggesting that my editable-by-hand config file contain @xxx@ and home-manager would replace it with the real value to generate the config file that is seen by dunst. Thus modifying this file without rerunning HM switch would not have any effect on dunst’s behaviour.
If dunst config files supported some kind of include (there is an open issue which has made no progress for 3 years), then I could include the HM-generated config containing the store path in my hand-written config, and this would give exactly what I want: HM takes care of icon_path, my hand-written config takes care of everything else, and they compose just fine without breaking each other or needing extra steps.
It could definitely work in principle. The question is whether some enabling mechanism (e.g. dunst config includes) exists. I haven’t found one, but my ignorance doesn’t prove anything.