about summary refs log tree commit diff
path: root/modules/common/bat.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/common/bat.nix36
1 files changed, 13 insertions, 23 deletions
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";
       };
     };
   };

Consider giving Nix/NixOS a try! <3