Skip to content

Instantly share code, notes, and snippets.

@kalbasit
Last active March 15, 2020 08:06
Show Gist options
  • Save kalbasit/dafe43126d420d356242f317437481a2 to your computer and use it in GitHub Desktop.
Save kalbasit/dafe43126d420d356242f317437481a2 to your computer and use it in GitHub Desktop.
Set all options named 'enable' to true
{ lib, options, ... }:
with lib;
{
config = mapAttrsRecursiveCond
(attrs: ! isOption attrs)
(path: value: mkIf (last path == "enable") true)
{ inherit (options) myOptions; };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment