From 3d5c02f843384aa647c52d7532eb9ca18a2299c5 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Wed, 21 May 2025 14:30:35 -0700 Subject: [PATCH] bat: use mkTarget --- modules/bat/hm.nix | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/modules/bat/hm.nix b/modules/bat/hm.nix index 074831c6..ff424fca 100644 --- a/modules/bat/hm.nix +++ b/modules/bat/hm.nix @@ -1,18 +1,20 @@ -{ config, lib, ... }: +{ mkTarget, ... }: +mkTarget { + name = "bat"; + humanName = "Bat"; -{ - options.stylix.targets.bat.enable = config.lib.stylix.mkEnableTarget "Bat" true; + configElements = + { colors }: + { + 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 = colors { + template = ./base16-stylix.tmTheme.mustache; + extension = ".tmTheme"; + }; - config = lib.mkIf (config.stylix.enable && config.stylix.targets.bat.enable) { - 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.tmTheme.mustache; - extension = ".tmTheme"; + config.theme = "base16-stylix"; }; - - config.theme = "base16-stylix"; }; - }; }