73 lines
1.8 KiB
Nix
73 lines
1.8 KiB
Nix
{ pkgs, config, impurity, ... }: {
|
|
# put it in /etc/shells
|
|
programs.zsh.enable = true;
|
|
|
|
users.users.${config.main-user}.shell = pkgs.zsh;
|
|
|
|
home-manager.users.${config.main-user} = { config, ... }: let
|
|
zshDir = ".config/zsh";
|
|
zshPath = "${config.home.homeDirectory}/${zshDir}";
|
|
|
|
history = 1000000;
|
|
in {
|
|
programs.zsh = {
|
|
enable = true;
|
|
|
|
# path to zsh configs
|
|
dotDir = zshDir;
|
|
enableCompletion = true;
|
|
|
|
history = {
|
|
path = "${zshPath}/history";
|
|
|
|
# lines of history to save
|
|
save = history;
|
|
size = history;
|
|
};
|
|
|
|
plugins = [
|
|
{
|
|
name = "zsh-syntax-highlighting";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "zsh-users";
|
|
repo = "zsh-syntax-highlighting";
|
|
rev = "master";
|
|
sha256 = "iKx7lsQCoSAbpANYFkNVCZlTFdwOEI34rx/h1rnraSg=";
|
|
};
|
|
}
|
|
{
|
|
name = "zsh-completions";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "zsh-users";
|
|
repo = "zsh-completions";
|
|
rev = "master";
|
|
sha256 = "MRGIKZtXk1+Yb8AV4NOqpSiP4IkWxPTJoLftq7VDjoE=";
|
|
};
|
|
}
|
|
{
|
|
name = "zsh-autosuggestions";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "zsh-users";
|
|
repo = "zsh-autosuggestions";
|
|
rev = "master";
|
|
sha256 = "KLUYpUu4DHRumQZ3w59m9aTW6TBKMCXl2UcKi4uMd7w=";
|
|
};
|
|
}
|
|
];
|
|
|
|
initExtra = ''
|
|
# keybinds
|
|
source ${impurity.link ./keybinds.zsh}
|
|
|
|
# completions
|
|
source ${impurity.link ./completion.zsh}
|
|
'';
|
|
|
|
shellAliases = {
|
|
"ee" = "emacsclient -c";
|
|
"e" = "hyprctl dispatch hy3:makegroup tab, ephemeral && emacsclient -c";
|
|
};
|
|
};
|
|
};
|
|
}
|