about summary refs log tree commit diff
path: root/config/zsh/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'config/zsh/default.nix')
-rw-r--r--config/zsh/default.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/config/zsh/default.nix b/config/zsh/default.nix
new file mode 100644
index 000000000000..2c322ab6e928
--- /dev/null
+++ b/config/zsh/default.nix
@@ -0,0 +1,20 @@
+{ configTools, stdenv, lib, writeText, linkFarm, zsh
+, coreutils, zsh-nix-shell, zsh-syntax-highlighting
+, zsh-history-substring-search, zsh-autosuggestions
+}:
+
+let
+  inherit (lib) mapAttrsToList;
+
+  files = {
+    ".zshrc" = writeText "zshrc" (import ./zshrc.nix {
+      inherit stdenv lib coreutils zsh-nix-shell zsh-syntax-highlighting
+              zsh-history-substring-search zsh-autosuggestions;
+    });
+  };
+
+in
+  configTools.setEnv zsh "zsh" {
+    ZDOTDIR = linkFarm "zdotdir"
+                (mapAttrsToList (name: path: { inherit name path; }) files);
+  }