feat(cheetah): add zsh

Set `zsh` as default shell
Integrate with `direnv` and `starship`
This commit is contained in:
reo101 2022-11-24 02:16:02 +02:00
parent 80a2881952
commit 05d057eba4
2 changed files with 43 additions and 0 deletions

View file

@ -12,6 +12,8 @@
# # Set $EDITOR
# environment.variables.EDITOR = "nvim";
user.shell = "${pkgs.zsh}/bin/zsh";
# Read the changelog before changing this value
system.stateVersion = "22.05";

View file

@ -35,6 +35,9 @@
zip
unzip
direnv
nix-direnv
# Bling
onefetch
neofetch
@ -90,6 +93,39 @@
];
};
programs.zsh = {
enable = true;
enableCompletion = true;
defaultKeymap = "viins";
shellAliases = {
# ll = "ls -l";
# update = "sudo nixos-rebuild switch";
};
history = {
size = 10000;
path = "${config.xdg.dataHome}/zsh/history";
};
initExtra = ''
eval "$(direnv hook zsh)"
'';
plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "v0.5.0";
sha256 = "0za4aiwwrlawnia4f29msk822rj9bgcygw6a8a6iikiwzjjz0g91";
};
}
];
};
programs.starship = {
enable = true;
@ -297,4 +333,9 @@
defaultCacheTtl = 1800;
enableSshSupport = true;
};
# Using nix-direnv
# services.lorri = {
# enable = true;
# };
}