mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
bahaghari/lib/tinted-theming: fix isBaseX
This commit is contained in:
parent
8cb22268af
commit
4834595351
@ -4,9 +4,11 @@ let
|
||||
isBaseX = i: palette:
|
||||
let
|
||||
paletteNames = pkgs.lib.attrNames palette;
|
||||
schemeNames = builtins.map (number: "base${number}") (lib.hex.range 0 (i - 1));
|
||||
maxDigitLength = pkgs.lib.lists.length (pkgs.lib.toBaseDigits 10 i);
|
||||
mkBaseAttr = hex: "base${lib.hex.pad maxDigitLength hex}";
|
||||
schemeNames = builtins.map mkBaseAttr (lib.hex.range 0 (i - 1));
|
||||
in
|
||||
(pkgs.lib.count (name: pkgs.lib.elem name schemeNames) paletteNames) == i;
|
||||
(pkgs.lib.count (name: pkgs.lib.elem name schemeNames) paletteNames) == i;
|
||||
in
|
||||
{
|
||||
# TODO: Return a derivation containing all of the template output from the
|
||||
|
Loading…
Reference in New Issue
Block a user