about summary refs log tree commit diff
path: root/users/fcuny/cli/zsh.nix
blob: 3358e50301866b276e6562bfef01a1f2ff9a0430 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{config, lib, pkgs, ...}:

{

  xdg.configFile."zsh/personal".source = config.lib.file.mkOutOfStoreSymlink ../configs/zsh;

  programs.zsh = {
    enable = true;
    enableAutosuggestions = true;
    enableCompletion = true;
    defaultKeymap = "emacs";
    history = {
      save = 100000;
      extended = true;
      ignoreDups = true;
    };
    initExtra = ''
      source ${config.xdg.configHome}/zsh/personal/init.zsh
      # Activate home-manager environment, if not already enabled
      [ -d "$HOME/.nix-profile" ] || /nix/var/nix/profiles/per-user/$USER/home-manager/activate &> /dev/null
    '';
  };
}