mirror of
https://github.com/RGBCube/ThemeNix
synced 2025-07-27 00:17:45 +00:00
30 lines
1.1 KiB
Nix
30 lines
1.1 KiB
Nix
{
|
|
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;
|
|
}
|