From 8d3978c149352de6b7e8b72946b58a16427eda2c Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Thu, 7 Dec 2023 22:08:00 +0100 Subject: lib.types.boolByOr: init This type is necessary to have correct merging behavior for `allowUnfreePredicate` and `allowInsecurePredicate` Co-authored-by: Robert Hensing --- lib/tests/modules/boolByOr.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lib/tests/modules/boolByOr.nix (limited to 'lib/tests/modules') diff --git a/lib/tests/modules/boolByOr.nix b/lib/tests/modules/boolByOr.nix new file mode 100644 index 000000000000..ff86e2dfc859 --- /dev/null +++ b/lib/tests/modules/boolByOr.nix @@ -0,0 +1,14 @@ +{ lib, ... }: { + + options.value = lib.mkOption { + type = lib.types.lazyAttrsOf lib.types.boolByOr; + }; + + config.value = { + falseFalse = lib.mkMerge [ false false ]; + trueFalse = lib.mkMerge [ true false ]; + falseTrue = lib.mkMerge [ false true ]; + trueTrue = lib.mkMerge [ true true ]; + }; +} + -- cgit 1.4.1