about summary refs log tree commit diff
path: root/home/modules/misc/neotheme/default.nix
blob: 2a0eabeeee8e494b30a9edd585aefd10b14e15a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{ lib, pkgs, config, ... }:

with lib;
let cfg = config.neotheme;
in
{
  options.neotheme = {
    name = mkOption {
      type = types.str;
      default = "";
      description = "palette name";
      example = "My Amazing Theme";
    };

    identifier = mkOption {
      type = types.str;
      default = "";
      description = "palette identifier";
      example = "mytheme";
    };

    colors =
      let
        mkColorOption = name: {
          inherit name;
          value = mkOption {
            type = types.strMatching "[a-fA-F0-9]{6}";
            description = "color ${name}.";
          };
        };
      in
      listToAttrs (map mkColorOption [
        "background"
        "foreground"
        "alt0"
        "alt1"
        "color0"
        "color1"
        "color2"
        "color3"
        "color4"
        "color5"
        "color6"
        "color7"
        "bright0"
        "bright1"
        "bright2"
        "bright3"
        "bright4"
        "bright5"
        "bright6"
        "bright7"
      ]);

    gtk = {
      theme = {
        dark = mkOption {
          type = types.str;
          default = "";
          description = "Theme for light mode";
        };
        light = mkOption {
          type = types.str;
          default = "";
          description = "Theme for light mode";
        };
      };
      iconTheme = {
        dark = mkOption {
          type = types.str;
          default = "";
          description = "Icon theme for light mode";
        };
        light = mkOption {
          type = types.str;
          default = "";
          description = "Icon theme for light mode";
        };
      };
    };
  };
}