mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-02-24 12:28:32 +00:00

theme/theme.nix: fix formatting supported-themes.nix: formatting clean up base16-colors.nix theme: fix plugin setup, change base16 flake input
13 lines
392 B
Nix
13 lines
392 B
Nix
{lib}: let
|
|
inherit (lib.strings) isString hasPrefix;
|
|
inherit (lib.types) mkOptionType;
|
|
inherit (builtins) stringLength;
|
|
# This was almost entirely taken from raf himself.
|
|
in {
|
|
hexColorType = mkOptionType {
|
|
name = "hex-color";
|
|
descriptionClass = "noun";
|
|
description = "RGB color in hex format";
|
|
check = x: isString x && hasPrefix "#" x && stringLength x == 7;
|
|
};
|
|
}
|