summaryrefslogtreecommitdiffstats
path: root/sh.nix
blob: f16b3cf8ccea5e841e0edad0a9ab621e3828fba6 (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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
  config,
  lib,
  pkgs,
  ...
}:
  myAliases = {
    ll = "ls -l";
    ".." = "cd ..";
  };
in
{
  programs.bash = {
    enable = true;
    shellAliases = myAliases;
  };
  programs.zsh = {
    enable = true;
    enableCompletion = true; # Enables zsh-completions
    autosuggestion.enable = true; # Enables zsh-autosuggestions
    syntaxHighlighting.enable = true; # Enables zsh-syntax-highlighting
    oh-my-zsh = {
      enable = true;
      plugins = [
        "git" # Git plugin
        "colored-man-pages" # Colored man pages
        "alias-finder" # Find aliases for commands
      ];
      theme = "";
    };
    initContent = ''
            # Powerlevel10k configuration
            source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
      	source ${./.p10k.zsh}
            # Initialize zoxide
            eval "$(zoxide init zsh)"

            # Initialize fzf
            source <(fzf --zsh)

            # Source fzf-tab (needs to be after fzf)
            source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh

            # Custom aliases
            alias ll="ls -la"
            alias gs="git status"

      	bindkey '^ ' autosuggest-execute
    '';
  };
  programs.fish = {
		enable = true;
  };
}