From 423ed4d1d62d2bed1493586fcf6bacf1088bf82e Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Sat, 5 Oct 2024 11:18:17 +0000 Subject: [PATCH] theme/theme.nix: fix up base16 helper func Co-authored-by: diniamo <55629891+diniamo@users.noreply.github.com> --- modules/plugins/theme/theme.nix | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/plugins/theme/theme.nix b/modules/plugins/theme/theme.nix index 9ab088a1..72a006d3 100644 --- a/modules/plugins/theme/theme.nix +++ b/modules/plugins/theme/theme.nix @@ -17,18 +17,18 @@ inherit lib config; }; - numbers = lib.stringToCharacters "0123456789ABCDEF"; - generateBase16Options = listToAttrs (map (i: { - name = "base0${i}"; - value = mkOption { - type = hexColor; - apply = v: - if hasPrefix "#" v - then v - else "#${v}"; - }; - }) - numbers); + numbers = ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "A" "B" "C" "D" "E" "F"]; + base16Options = listToAttrs (map (n: { + name = "base0${n}"; + value = mkOption { + description = "The base0${n} color to use"; + type = hexColor; + apply = v: + if hasPrefix "#" v + then v + else "#${v}"; + }; + }) numbers); in { options.vim.theme = { enable = mkOption {