mirror of
https://github.com/RGBCube/ThemeNix
synced 2025-07-28 17:07:46 +00:00
Make slugs only exist in runtime, add info fields to theme.<name>.withHashtag.{name, author}, fix templates issue
This commit is contained in:
parent
8dad0349c4
commit
4d4ec5a91b
253 changed files with 17 additions and 265 deletions
26
flake.nix
26
flake.nix
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
description = "Theme your NixOS configuration consistently.";
|
||||
|
||||
outputs = { self }: builtins.mapAttrs (_: theme: let
|
||||
outputs = { self }: builtins.mapAttrs (slug: theme: let
|
||||
themeDescriptiveNames = with theme; {
|
||||
background = base00;
|
||||
lighterBackground = base01;
|
||||
|
@ -50,17 +50,21 @@
|
|||
openingClosingEmbeddedLanguageTag = base0F;
|
||||
};
|
||||
|
||||
enrichedTheme = theme // themeDescriptiveNames;
|
||||
|
||||
enrichedThemeOnlyColors = builtins.removeAttrs enrichedTheme [ "name" "author" ];
|
||||
|
||||
enrichedThemeHelpers = {
|
||||
with0x = builtins.mapAttrs (_: value: "0x" + value) enrichedThemeOnlyColors;
|
||||
withHashtag = builtins.mapAttrs (_: value: "#" + value) enrichedThemeOnlyColors;
|
||||
themeWithSlug = theme // {
|
||||
inherit slug;
|
||||
};
|
||||
|
||||
templates = builtins.mapAttrs (_: value: {
|
||||
tmTheme = (import ./templates/tmTheme.nix) value;
|
||||
}) enrichedTheme;
|
||||
enrichedTheme = themeWithSlug // themeDescriptiveNames;
|
||||
|
||||
enrichedThemeOnlyColors = builtins.removeAttrs enrichedTheme [ "name" "author" "slug" ];
|
||||
|
||||
enrichedThemeHelpers = {
|
||||
with0x = builtins.mapAttrs (_: value: "0x" + value) (enrichedTheme // enrichedThemeOnlyColors);
|
||||
withHashtag = builtins.mapAttrs (_: value: "#" + value) (enrichedTheme // enrichedThemeOnlyColors);
|
||||
};
|
||||
|
||||
templates = {
|
||||
tmTheme = (import ./templates/tmTheme.nix) theme;
|
||||
};
|
||||
in enrichedTheme // enrichedThemeHelpers // templates) (import ./themes.nix);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue