snowfallorg / lib

Unified configuration for systems, packages, modules, shells, templates, and more with Nix Flakes.

Home Page:https://snowfall.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conditional overlays

expipiplus1 opened this issue · comments

For home modules, setting nixpkgs.overlays doesn't seem to do anything (although it does have an effect when not using snowfall).

Test by adding nixpkgs.overlays = [ (self: super: { stdenv = null; }) ]; and not having everything fail.

This isn't a huge problem, just dump overlays in ./overlays/blah, but these are applied unconditionally. Is there an elegant way to apply an overlay for a home config conditionally based on some option? (There are definitely inelegant ways of doing this, but nothing I've found quite as easy as nixpkgs.overlays = lib.optional beep boop;

Ah, this isn't supported when supplying pkgs to the module system. So you'll have to write things such that your overlays will always be applied.

understood :)

Feel free to close this if it's a wontfix