Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ rec {
type = lib.types.bool;
};

/* Like mkEnableOption but defaulting to true. */
mkEnabledOption =
# Name for the created option
name: mkOption {
default = true;
example = false;
description = "Whether to enable ${name}.";
type = lib.types.bool;
};

/* This option accepts anything, but it does not produce any result.

This is useful for sharing a module across different module sets
Expand Down