65 lines
1.3 KiB
Nix
65 lines
1.3 KiB
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
programs.zsh = {
|
|
enable = true;
|
|
enableCompletion = true;
|
|
|
|
# History settings
|
|
history = {
|
|
size = 10000;
|
|
path = "$HOME/.zsh_history";
|
|
ignoreDups = true;
|
|
share = true;
|
|
};
|
|
|
|
autosuggestion = {
|
|
enable = true;
|
|
};
|
|
|
|
# Shell options
|
|
initExtra = ''
|
|
# Enable vi mode
|
|
bindkey -v
|
|
|
|
# Better history search
|
|
bindkey '^R' history-incremental-search-backward
|
|
|
|
# Basic auto/tab completion
|
|
autoload -U compinit
|
|
zstyle ':completion:*' menu select
|
|
zmodload zsh/complist
|
|
compinit
|
|
_comp_options+=(globdots)
|
|
'';
|
|
|
|
# Aliases
|
|
shellAliases = {
|
|
ll = "ls -la";
|
|
".." = "cd ..";
|
|
"..." = "cd ../..";
|
|
update = "sudo nixos-rebuild switch";
|
|
vim = "nvim";
|
|
};
|
|
|
|
plugins = [
|
|
{
|
|
name = "zsh-syntax-highlighting";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "zsh-users";
|
|
repo = "zsh-syntax-highlighting";
|
|
rev = "refs/tags/0.8.0";
|
|
sha256 = "1yl8zdip1z9inp280sfa5byjbf2vqh2iazsycar987khjsi5d5w8";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
programs.oh-my-posh = {
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
package = pkgs.oh-my-posh;
|
|
settings = builtins.fromJSON (builtins.readFile ./oh-my-posh/config.json);
|
|
};
|
|
}
|