summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
authorSilas Schöffel <sils@sils.li>2024-06-01 18:42:08 +0200
committerSilas Schöffel <sils@sils.li>2024-06-01 18:42:08 +0200
commit5c7f4603d37a1c8b1fb79a95cd3c4b74848bbfdf (patch)
tree9425be5c49f298a40cdd6ddbb6ec032302c3eabf /modules
parentzsh: update sys-update to delete files in hms way (diff)
downloadnix-config-5c7f4603d37a1c8b1fb79a95cd3c4b74848bbfdf.tar.gz
nix-config-5c7f4603d37a1c8b1fb79a95cd3c4b74848bbfdf.zip
direnv: init module
Diffstat (limited to 'modules')
-rw-r--r--modules/hm/sils/default.nix1
-rw-r--r--modules/hm/sils/direnv.nix15
2 files changed, 16 insertions, 0 deletions
diff --git a/modules/hm/sils/default.nix b/modules/hm/sils/default.nix
index 09fc911..3e296e2 100644
--- a/modules/hm/sils/default.nix
+++ b/modules/hm/sils/default.nix
@@ -1,6 +1,7 @@
 {...}: {
   imports = [
     ./bat.nix
+    ./direnv.nix
     ./firefox
     ./jameica.nix
     ./kdeconnect.nix
diff --git a/modules/hm/sils/direnv.nix b/modules/hm/sils/direnv.nix
new file mode 100644
index 0000000..88ee8f8
--- /dev/null
+++ b/modules/hm/sils/direnv.nix
@@ -0,0 +1,15 @@
+{
+  config,
+  lib,
+  ...
+}: let
+  cfg = config.sils.direnv;
+in {
+  options.sils.direnv.enable = lib.mkEnableOption "direnv";
+  config = lib.mkIf cfg.enable {
+    programs.direnv = {
+      enable = true;
+      nix-direnv.enable = true;
+    };
+  };
+}