-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
30 lines (26 loc) · 1.11 KB
/
flake.nix
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
{
description = "Theme your NixOS configuration consistently.";
outputs = { self }: let
raw = import ./themes.nix;
isValidColor = thing: if builtins.isString thing then
(builtins.match "^[0-9a-fA-F]{6}" thing) != null
else
false;
in {
inherit raw;
custom = theme: let
with0x = theme // (builtins.mapAttrs (_: value: if isValidColor value then "0x" + value else value) theme);
withHashtag = theme // (builtins.mapAttrs (_: value: if isValidColor value then "#" + value else value) theme);
themeFull = theme // {
inherit with0x withHashtag;
};
in themeFull // {
adwaitaGtkCss = (import ./templates/adwaitaGtkCss.nix) themeFull;
btopTheme = (import ./templates/btopTheme.nix) themeFull;
discordCss = (import ./templates/discordCss.nix) themeFull;
firefoxTheme = (import ./templates/firefoxTheme.nix) themeFull;
ghosttyConfig = (import ./templates/ghosttyConfig.nix) themeFull;
tmTheme = (import ./templates/tmTheme.nix) themeFull;
};
} // builtins.mapAttrs (name: self.custom) raw;
}