/ home-manager / zsh.nix
zsh.nix
 1  { pkgs, config, ... }:
 2  /*
 3    let
 4      plugins = [
 5  
 6      ];
 7    in
 8  */
 9  {
10    home.file."${config.xdg.cacheHome}/oh-my-zsh/.keep".text = "";
11  
12    home.persistence."/persist/home/egor" = {
13      directories = [
14        ".cache/oh-my-zsh"
15        ".cache/nix-index"
16      ];
17      files = [
18        ".config/zsh/.zsh_history"
19        ".zsh_history"
20      ];
21    };
22  
23    home.packages = with pkgs; [
24      mosh
25      tmux
26      zsh-bd
27      fzf
28      autojump
29    ];
30    /*
31      programs.nushell = {
32        enable = true;
33        extraConfig = ''
34          $env.config.hooks.command_not_found = source ${pkgs.nix-index}/etc/profile.d/command-not-found.nu
35        '';
36      };
37    */
38    home.shell = {
39      enableZshIntegration = true;
40    };
41    programs = {
42      nix-index = {
43        enable = true;
44        enableZshIntegration = true;
45      };
46      zsh = {
47        enable = true;
48        autocd = true;
49        #dotDir = "${config.xdg.configHome}/zsh";
50        autosuggestion.enable = true;
51        enableCompletion = true;
52        #enableVteIntegration = true;
53        #syntaxHighlighting.enable = true;
54        oh-my-zsh = {
55          enable = true;
56          theme = "robbyrussell";
57          plugins = [
58            "autojump"
59            "git"
60            "colored-man-pages"
61            "zsh-interactive-cd"
62            "history"
63            "history-substring-search"
64  
65            # "nix-zsh-completions"
66            "fzf"
67          ];
68        };
69        /*
70          completionInit = ''
71  
72          '';
73  
74          initContent = ''
75            POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
76          '';
77        */
78  
79      };
80    };
81  
82    programs.zoxide = {
83      enable = true;
84      enableZshIntegration = true;
85    };
86  }