From 43d23b1609b87f6a4100db2a09bd118c52c78766 Mon Sep 17 00:00:00 2001 From: Alvaro Fresquet <29437693+afresquet@users.noreply.github.com> Date: Wed, 1 May 2024 11:16:52 +0200 Subject: [PATCH] bat: use config instead of env variable (#353) Replaces the usage of the BAT_THEME environment variable in favor of the built in config parameter `theme`. --- modules/bat/hm.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/bat/hm.nix b/modules/bat/hm.nix index 94e554ad..208cc924 100644 --- a/modules/bat/hm.nix +++ b/modules/bat/hm.nix @@ -5,12 +5,15 @@ config.lib.stylix.mkEnableTarget "Bat" config.programs.bat.enable; config = lib.mkIf config.stylix.targets.bat.enable { - # This theme is reused for yazi. Changes to the template - # will need to be applied to modules/yazi/hm.nix - programs.bat.themes."base16-stylix".src = config.lib.stylix.colors { - template = ./base16-stylix.mustache; - extension = ".tmTheme"; + programs.bat = { + # This theme is reused for yazi. Changes to the template + # will need to be applied to modules/yazi/hm.nix + themes."base16-stylix".src = config.lib.stylix.colors { + template = ./base16-stylix.mustache; + extension = ".tmTheme"; + }; + + config.theme = "base16-stylix"; }; - home.sessionVariables.BAT_THEME = "base16-stylix"; }; }