Avoid IFD in bat module (#158)

This commit is contained in:
Bernardo Meurer 2023-10-10 05:46:25 -04:00 committed by GitHub
parent b42555850b
commit 4d76e2da7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,17 +1,14 @@
{ pkgs, config, lib, ... }:
let
themeFile = config.lib.stylix.colors {
template = ./base16-stylix.mustache;
extension = ".tmTheme";
};
in
{
options.stylix.targets.bat.enable =
config.lib.stylix.mkEnableTarget "Bat" config.programs.bat.enable;
config = lib.mkIf config.stylix.targets.bat.enable {
programs.bat.themes."base16-stylix" = builtins.readFile themeFile;
programs.bat.themes."base16-stylix".src = config.lib.stylix.colors {
template = ./base16-stylix.mustache;
extension = ".tmTheme";
};
home.sessionVariables.BAT_THEME = "base16-stylix";
};
}