Initial zsh setup
This commit is contained in:
parent
368bf1f1f3
commit
37e8506352
4 changed files with 109 additions and 0 deletions
67
modules/zsh/default.nix
Normal file
67
modules/zsh/default.nix
Normal file
|
@ -0,0 +1,67 @@
|
|||
{ 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}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue