Preventing a module from creating a file

Hi ! I want to try Dunst notification daemon using Home Manager’s module. the only problem I have is that the module creates a configuration file in $XDG_CONFIG_HOME. I have a function that reuses my Stow configuration directory. it’s nice to have for a couple reasons:

  • I don’t have to rewrite all configs to Nix DSL
  • adding configuration for any tool I have is simple as (packageHomeFiles ../stow-configs/nvim)
  • I can temporary use Stow instead of Home Manager so I don’t have to rebuild my system on every config change I want to test (it’s usually a bunch of little change-and-run’s when I try a new tool)

it all works great until a module wants to create a config file it self. so my question is: is it possible to prevent a module from creating certain file ? besides override the module with custom implementation ofc

xdg.configFile."dunst/dunstrc".enable = false; should do the trick.

1 Like

thank you so much, you are awesome !