diff --git a/modules/servers/general/default.nix b/modules/servers/general/default.nix index 6bfbff8..bbdb18a 100644 --- a/modules/servers/general/default.nix +++ b/modules/servers/general/default.nix @@ -11,5 +11,6 @@ ./optimise-storage.nix ./restic.nix ./nix-features.nix + ./shell.nix ]; } diff --git a/modules/servers/general/shell.nix b/modules/servers/general/shell.nix new file mode 100644 index 0000000..0f157b0 --- /dev/null +++ b/modules/servers/general/shell.nix @@ -0,0 +1,54 @@ +{pkgs, ...}: { + users.extraUsers.root = { + shell = pkgs.zsh; + }; + + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestions.enable = true; + # historySubstringSearch.enable = true; + + shellAliases = { + # General aliases + grep = "grep --color=auto"; + cp = "cp -iv"; + rm = "rm -iv"; + mkd = "mkdir -pv"; + less = "less -R"; + df = "df -h -x devtmpfs -x tmpfs -x usbfs -x loop"; + free = "free -mht"; + # nnn on crack + nnn = ''LC_COLLATE="C" nnn -xeaiH''; + # Buku powerup + b = "buku -p"; + # fzf shenanigans + vif = ''nvim $(fzf --preview="bat --color=always {}")''; + }; + + ohMyZsh = { + enable = true; + plugins = [ + "zap-zsh/supercharge" + "zap-zsh/completions" + "zap-zsh/vim" + "chivalryq/git-alias" + "zdharma-continuum/fast-syntax-highlighting" + "zsh-users/zsh-history-substring-search" + "MichaelAquilina/zsh-you-should-use" + ]; + }; + # antidote = { + # enable = true; + # plugins = [ + # "zap-zsh/supercharge" + # "zap-zsh/completions" + # "zap-zsh/vim" + # "chivalryq/git-alias" + # "zdharma-continuum/fast-syntax-highlighting" + # "zsh-users/zsh-history-substring-search" + # "MichaelAquilina/zsh-you-should-use" + # ]; + # }; + }; +}