diff options
author | Rick van Schijndel <Mindavi@users.noreply.github.com> | 2024-04-19 08:26:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-19 08:26:09 +0200 |
commit | e00a40a257e9d960a94020989e00b7d7c1238294 (patch) | |
tree | 32aa468dd35693061a7104c23ea04aa4f2bc26d7 /nixos | |
parent | f8022afb8b7a0cb91184ba2a510251af454142db (diff) | |
parent | 7b687a59cd8ee5db7cfd8067943149dd0d9215cf (diff) |
Merge pull request #298680 from gvolpe/lib/transposeMap
lib/attrsets: add mapCartesianProduct function
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/x11/display-managers/default.nix | 4 | ||||
-rw-r--r-- | nixos/tests/predictable-interface-names.nix | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index 4c62e964c34c4..0f9b712c6df53 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -284,7 +284,7 @@ in in # We will generate every possible pair of WM and DM. concatLists ( - builtins.map + lib.mapCartesianProduct ({dm, wm}: let sessionName = "${dm.name}${optionalString (wm.name != "none") ("+" + wm.name)}"; script = xsession dm wm; @@ -312,7 +312,7 @@ in providedSessions = [ sessionName ]; }) ) - (cartesianProductOfSets { dm = dms; wm = wms; }) + { dm = dms; wm = wms; } ); }; diff --git a/nixos/tests/predictable-interface-names.nix b/nixos/tests/predictable-interface-names.nix index 51d5e8ae59b92..9ac4f8211e6b1 100644 --- a/nixos/tests/predictable-interface-names.nix +++ b/nixos/tests/predictable-interface-names.nix @@ -5,7 +5,7 @@ let inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest; - testCombinations = pkgs.lib.cartesianProductOfSets { + testCombinations = pkgs.lib.cartesianProduct { predictable = [true false]; withNetworkd = [true false]; systemdStage1 = [true false]; |