style: fix formatting

This commit is contained in:
Laszlo Bacsi 2025-06-13 19:48:03 +02:00
commit 6df9ed87a7
No known key found for this signature in database
GPG key ID: 7AC6E86EE9E48853

View file

@ -231,9 +231,12 @@ in {
... ...
}: let }: let
parts = splitString "-" style; parts = splitString "-" style;
detect = list: detect = list: let
let intersection = intersectLists parts list; intersection = intersectLists parts list;
in if intersection == [] then null else builtins.head intersection; in
if intersection == []
then null
else builtins.head intersection;
background = detect backgrounds; background = detect backgrounds;
palette = detect palettes; palette = detect palettes;
variant = detect variants; variant = detect variants;
@ -251,12 +254,18 @@ in {
''; '';
styles = let styles = let
joinWithDashes = parts: lib.concatStringsSep "-" (lib.filter (s: s != "") parts); joinWithDashes = parts: lib.concatStringsSep "-" (lib.filter (s: s != "") parts);
combinations = mapCartesianProduct ({bg, pal, var}: joinWithDashes [bg pal var]) { combinations = mapCartesianProduct ({
bg,
pal,
var,
}:
joinWithDashes [bg pal var]) {
bg = [""] ++ backgrounds; bg = [""] ++ backgrounds;
pal = [""] ++ palettes; pal = [""] ++ palettes;
var = [""] ++ variants; var = [""] ++ variants;
}; };
in lib.filter (s: s != "") combinations; in
lib.filter (s: s != "") combinations;
}; };
solarized-osaka = { solarized-osaka = {