bat: use mkTarget
This commit is contained in:
parent
f4a4b2690c
commit
3d5c02f843
1 changed files with 15 additions and 13 deletions
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue