lib: options: add mkDisableOption

This commit is contained in:
Bruno BELANYI 2021-03-10 18:50:28 +00:00
parent 331b7cf8e3
commit 5b646ec174
1 changed files with 10 additions and 0 deletions

10
lib/options.nix Normal file
View File

@ -0,0 +1,10 @@
{ lib, ... }:
let
inherit (lib) mkEnableOption;
in
{
# Create an option which is enabled by default, in contrast to
# `mkEnableOption` ones which are disabled by default.
mkDisableOption =
description: (mkEnableOption description) // { default = true; };
}