From 96f402df7f5271d2304afa8fdbbb982fcd7e0c2c Mon Sep 17 00:00:00 2001 From: RGBCube Date: Tue, 28 Nov 2023 14:25:03 +0300 Subject: [PATCH] Expose raw themes --- README.md | 11 +++++++++++ flake.nix | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4363290..5e15e07 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,17 @@ let in {} ``` +If you want to create your own theme based on an included theme, you can do this: + +```nix +let + myTheme = themes.custom (themes.raw.tango // { + base00 = "2E3436"; + accent = themes.raw.tango.base0A; # Custom properties also work! + }) +in {} +``` +
All themes diff --git a/flake.nix b/flake.nix index 2fe8443..50a1cd8 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,8 @@ description = "Theme your NixOS configuration consistently."; outputs = { self }: { + raw = import ./themes.nix; + custom = theme: let onlyColors = builtins.removeAttrs theme [ "name" "author" ]; @@ -15,5 +17,5 @@ tmTheme = (import ./templates/tmTheme.nix) themeFull; adwaitaGtkCss = (import ./templates/adwaitaGtkCss.nix) themeFull; }; - } // builtins.mapAttrs (name: self.custom) (import ./themes.nix); + } // builtins.mapAttrs (name: self.custom) self.raw; }