aboutsummaryrefslogtreecommitdiffstats
path: root/modules/terminal/bat/default.nix
blob: 3c962a3f9d760e08ba0c667d1b69cfd8db9419e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
  config,
  lib,
  pkgs,
  ...
}:

# bat - a cat clone with wings
{
  config = lib.mkIf config.programs.bat.enable {
    programs.bat = {
      config = {
        theme = "base16";
      };
      themes = {
        base16 = {
          src = pkgs.runCommand "bat-base16-theme" { } ''
            mkdir -p $out
            cp ${config.scheme { template = ./base16.mustache.tmTheme; }} $out/base16.tmTheme
          '';
          file = "base16.tmTheme";
        };
      };
    };
  };
}