Why are overlays better than pkgOverrides?

I wondered this myself and I eventually tracked down the source of my cognitive dissonance:

  • A static set of overlays can be squashed into an override, and in fact this has better syntactic locality and denotationality. Therefore my personal NixOS configuration only uses overrides.
  • However, if you’re mixing and matching (an overlay for Mac users, an overlay for DVORAK users…) then overlays make sense. You no longer need denotationality since the overlay is configuration-specific and the installer can indeed overlay the installation with their custom set of overlays.
1 Like