diff options
Diffstat (limited to 'modules/bat.nix')
-rw-r--r-- | modules/bat.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/bat.nix b/modules/bat.nix new file mode 100644 index 0000000..a95d67d --- /dev/null +++ b/modules/bat.nix @@ -0,0 +1,26 @@ +{ config, lib, ... }: +with lib; +let + cfg = config.nixfiles.modules.bat; +in +{ + options.nixfiles.modules.bat.enable = mkEnableOption "bat, an alternative to cat"; + + config = mkIf cfg.enable { + nixfiles.modules.common.shell.aliases = { + baj = "bat --language=json --tabs 2"; + bay = "bat --language=yaml --tabs 2"; + bas = "bat --language=syslog"; + less = "bat"; + }; + + hm.programs.bat = { + enable = true; + config = { + style = "plain"; + tabs = "4"; + wrap = "never"; + }; + }; + }; +} |