about summary refs log tree commit diff
path: root/config/zsh/default.nix
blob: 2c322ab6e9287014950159ced9d41c79f2bb0f6d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);
  }