~ruther/nixos-config

ref: 5b1602c8f5563556f28c67d066d1aee7b46e55e7 nixos-config/modules/shell/zsh.nix -rw-r--r-- 711 bytes
5b1602c8 — Frantisek Bohacek chore: update 1 year, 3 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#
# Shell
#

{ pkgs, ... }:

{
  programs = {
    starship = {
      enable = true;
    };
    zsh = {
      enable = true;
      autosuggestion.enable = true;
      syntaxHighlighting.enable = true;
      enableCompletion = true;
      history.size = 100000;

      oh-my-zsh = {                               # Extra plugins for zsh
        enable = true;
        plugins = [ "git" ];
      };

      initExtra = ''
        function loc {
          nix-locate --top-level -w /bin/$1
        }
        function exa-nixpkgs-derivation {
          nix run nixpkgs#eza -- --tree $(nix build nixpkgs#$1 --print-out-paths --out-link /tmp/$1)
        }

        # source /etc/set-environment
      '';
    };
  };
}
Do not follow this link