blob: c49a198a4bc53705d363f0a3f674bfc94cd86160 (
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
{
config,
pkgs,
lib,
...
}: let
cfg = config.aesthetics;
in {
imports = [
./targets
./themes
];
options.aesthetics = {
enable = lib.mkEnableOption "aesthetics";
theme = lib.mkOption {
type = lib.types.str;
description = "The name of the theme to use.";
default = "oxocarbon";
};
hasGui = lib.mkOption {
type = lib.types.bool;
description = "Whether to theme gui apps. (can break if no gui)";
default = false;
};
enableAllTargets = lib.mkEnableOption "all targets";
wallpapersDir = lib.mkOption {
type = lib.types.path;
description = "Where to find wallpapers.";
};
wallpaper = lib.mkOption {
type = lib.types.path;
description = "Where to find the default wallpaper.";
};
font = {
name = lib.mkOption {
type = lib.types.str;
default = "CodeNewRoman Nerd Font";
description = "The font to use.";
};
package = lib.mkOption {
type = lib.types.package;
default = pkgs.nerd-fonts.code-new-roman;
description = "The font package to use.";
};
size = {
small = lib.mkOption {
type = lib.types.str;
default = "10";
description = "The size of the font to use for small text. (e.g. terminals)";
};
medium = lib.mkOption {
type = lib.types.str;
default = "14";
description = "The size of the font to use for medium text. (e.g. waybar)";
};
large = lib.mkOption {
type = lib.types.str;
default = "18";
description = "The size of the font to use for large text.";
};
};
};
scheme = let
mkHexOption = {}:
lib.mkOption {
type = lib.types.str;
default = "";
example = "ffffff";
description = "A hex color";
};
in {
base00 = mkHexOption {};
base01 = mkHexOption {};
base02 = mkHexOption {};
base03 = mkHexOption {};
base04 = mkHexOption {};
base05 = mkHexOption {};
base06 = mkHexOption {};
base07 = mkHexOption {};
base08 = mkHexOption {};
base09 = mkHexOption {};
base0A = mkHexOption {};
base0B = mkHexOption {};
base0C = mkHexOption {};
base0D = mkHexOption {};
base0E = mkHexOption {};
base0F = mkHexOption {};
};
opacity = lib.mkOption {
type = lib.types.float;
description = "Opacity";
default = 1.0;
};
};
config = lib.mkIf cfg.enable {
aesthetics.themes.${cfg.theme}.enable = true;
home.packages = [cfg.font.package];
fonts.fontconfig.enable = true;
};
}
|