diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-11-02 15:19:44 +0100 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-11-02 15:19:44 +0100 |
| commit | 39a3a1a6f8c0a5bd387dcddf07ea686a3f2e493d (patch) | |
| tree | efabda5300b8247f1b7bc2787247a7351e52d100 /options.nix | |
| parent | fix(by-name-overlay): Correctly display the `rawPath` in warnings (diff) | |
| download | nix-library-39a3a1a6f8c0a5bd387dcddf07ea686a3f2e493d.zip | |
treewide: Add new math and options subcategories and restructure
Diffstat (limited to 'options.nix')
| -rw-r--r-- | options.nix | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/options.nix b/options.nix new file mode 100644 index 0000000..e01c10d --- /dev/null +++ b/options.nix @@ -0,0 +1,21 @@ +{lib}: { + /* + Generate an enable option definition, that defaults to true. + + This conveniently allows the composition of a “common” module set. + + # Type + + mkEnable :: String -> AttrSet + + # Arguments + + name + : The name to use in the option description. + */ + mkDefaultEnabled = name: + (lib.mkEnableOption name) + // { + default = true; + }; +} |
