From 67b82386d8ad8ae3eea5083bd22809f6192d92a8 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Thu, 23 Nov 2023 04:20:34 +0300 Subject: 2023-11-23 --- modules/common/bat.nix | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) (limited to 'modules/common/bat.nix') diff --git a/modules/common/bat.nix b/modules/common/bat.nix index 7f78a59..d95f709 100644 --- a/modules/common/bat.nix +++ b/modules/common/bat.nix @@ -6,32 +6,22 @@ with lib; let cfg = config.nixfiles.modules.bat; in { - options.nixfiles.modules.bat.enable = - mkEnableOption "bat, an alternative to cat"; + options.nixfiles.modules.bat.enable = mkEnableOption "bat, an alternative to cat"; config = mkIf cfg.enable { - hm.programs = { - bat = { - enable = true; - config = { - style = "plain"; - tabs = "4"; - theme = "base16"; - wrap = "never"; - }; - }; - - bash = { - shellAliases = { - baj = "bat --language=json --tabs 2"; - bay = "bat --language=yaml --tabs 2"; - bas = "bat --language=syslog"; - }; + nixfiles.modules.common.shell.aliases = { + baj = "bat --language=json --tabs 2"; + bay = "bat --language=yaml --tabs 2"; + bas = "bat --language=syslog"; + }; - initExtra = mkAfter '' - _complete_alias bay _bat bat - _complete_alias baj _bat bat - ''; + hm.programs.bat = { + enable = true; + config = { + style = "plain"; + tabs = "4"; + theme = "base16"; + wrap = "never"; }; }; }; -- cgit 1.4.1