helm/modules/shell/zsh.nix

49 lines
1.1 KiB
Nix
Raw Normal View History

2020-01-17 01:22:50 -08:00
# modules/shell/zsh.nix --- ...
2019-08-06 10:56:54 -07:00
2020-01-17 01:22:50 -08:00
{ pkgs, libs, ... }:
2019-08-06 10:56:54 -07:00
{
2020-01-12 15:17:17 -08:00
my = {
packages = with pkgs; [
2019-08-06 10:56:54 -07:00
zsh
nix-zsh-completions
2019-11-24 18:42:25 -08:00
bat
2019-08-06 10:56:54 -07:00
exa
2020-01-12 15:17:17 -08:00
fasd
2019-08-06 10:56:54 -07:00
fd
2019-11-26 14:00:28 -08:00
fzf
2019-08-06 10:56:54 -07:00
htop
2020-01-03 03:44:40 -08:00
tldr
2020-01-12 15:17:17 -08:00
tree
2019-08-06 10:56:54 -07:00
];
2020-01-12 15:17:17 -08:00
env.ZDOTDIR = "$XDG_CONFIG_HOME/zsh";
env.ZSH_CACHE = "$XDG_CACHE_HOME/zsh";
alias.exa = "exa --group-directories-first";
alias.l = "exa -1";
alias.ll = "exa -l";
alias.la = "LC_COLLATE=C exa -la";
alias.sc = "systemctl";
alias.ssc = "sudo systemctl";
2020-01-17 01:22:50 -08:00
# Write it recursively so other modules can write files to it
home.xdg.configFile."zsh" = {
source = <config/zsh>;
recursive = true;
};
2019-08-06 10:56:54 -07:00
};
programs.zsh = {
enable = true;
enableCompletion = true;
2020-01-17 01:22:50 -08:00
# I init completion myself, because enableGlobalCompInit initializes it too
# soon, which means commands initialized later in my config won't get
# completion, and running compinit twice is slow.
enableGlobalCompInit = false;
2019-08-06 10:56:54 -07:00
promptInit = "";
};
2020-01-17 01:22:50 -08:00
system.userActivationScripts.cleanupZgen = ''
rm -fv $XDG_CACHE_HOME/zsh/*
'';
2019-08-06 10:56:54 -07:00
}