summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSilas Schöffel <sils@sils.li>2024-04-21 17:54:18 +0200
committerSilas Schöffel <sils@sils.li>2024-04-22 17:12:55 +0200
commit960c950b43fb2a9c33af9a23e7569e30c00dabbe (patch)
tree4c63fa1e462a2f88cfba8cf464bc3fca38083d8e
parenthm: consume zathura module (diff)
downloadnix-config-960c950b43fb2a9c33af9a23e7569e30c00dabbe.tar.gz
nix-config-960c950b43fb2a9c33af9a23e7569e30c00dabbe.zip
bat: move to module
-rw-r--r--hm/bat/default.nix11
-rw-r--r--hm/default.nix2
-rw-r--r--modules/hm/sils/bat.nix21
-rw-r--r--modules/hm/sils/default.nix1
4 files changed, 23 insertions, 12 deletions
diff --git a/hm/bat/default.nix b/hm/bat/default.nix
deleted file mode 100644
index d7d073c..0000000
--- a/hm/bat/default.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{pkgs, ...}: {
-  programs.bat = {
-    enable = true;
-    extraPackages = with pkgs.bat-extras; [
-      batdiff
-      batman
-      batgrep
-      batwatch
-    ];
-  };
-}
diff --git a/hm/default.nix b/hm/default.nix
index ffb959e..c85da70 100644
--- a/hm/default.nix
+++ b/hm/default.nix
@@ -1,7 +1,6 @@
 {nixvim, ...}: {
   imports = [
     ../modules/hm
-    ./bat
     ./direnv
     ./etesync-dav
     #./eww
@@ -35,6 +34,7 @@
   };
 
   sils = {
+    bat.enable = true;
     firefox.enable = true;
     jameica.enable = true;
     mail.enable = true;
diff --git a/modules/hm/sils/bat.nix b/modules/hm/sils/bat.nix
new file mode 100644
index 0000000..5f7b967
--- /dev/null
+++ b/modules/hm/sils/bat.nix
@@ -0,0 +1,21 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}: let
+  cfg = config.sils.bat;
+in {
+  options.sils.bat.enable = lib.mkEnableOption "bat";
+  config = lib.mkIf cfg.enable {
+    programs.bat = {
+      enable = true;
+      extraPackages = with pkgs.bat-extras; [
+        batdiff
+        batman
+        batgrep
+        batwatch
+      ];
+    };
+  };
+}
diff --git a/modules/hm/sils/default.nix b/modules/hm/sils/default.nix
index c298715..fc0893f 100644
--- a/modules/hm/sils/default.nix
+++ b/modules/hm/sils/default.nix
@@ -1,5 +1,6 @@
 {...}: {
   imports = [
+    ./bat.nix
     ./firefox
     ./jameica.nix
     ./mail.nix