refactor: split into modules
This commit is contained in:
parent
501fe8533f
commit
8c281cd5d2
5 changed files with 229 additions and 215 deletions
47
home-manager/modules/zsh.nix
Normal file
47
home-manager/modules/zsh.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ config, pkgs, lib, libs, ... }:
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = false;
|
||||
dotDir = ".config/zsh";
|
||||
|
||||
shellAliases = {
|
||||
run = "./run";
|
||||
};
|
||||
|
||||
autocd = true;
|
||||
cdpath = [
|
||||
"$HOME/Code"
|
||||
"$HOME/Code/*"
|
||||
"$HOME"
|
||||
];
|
||||
|
||||
initExtra = ''
|
||||
# Case insensitive autocompletion.
|
||||
zstyle ":completion:*" matcher-list "" "m:{a-zA-Z}={A-Za-z}" "r:|=*" "l:|=* r:|=*"
|
||||
autoload -Uz compinit && compinit
|
||||
|
||||
# No arguments: `git status`
|
||||
# With arguments: acts like `git`
|
||||
g() {
|
||||
if [[ $# -gt 0 ]]; then
|
||||
git "$@"
|
||||
else
|
||||
git status
|
||||
fi
|
||||
}
|
||||
'';
|
||||
|
||||
zplug = {
|
||||
enable = true;
|
||||
|
||||
plugins = [
|
||||
{ name = "mollifier/cd-gitroot"; }
|
||||
{ name = "romkatv/powerlevel10k"; tags = [ as:theme depth:1 ]; }
|
||||
{ name = "zsh-users/zsh-autosuggestions"; }
|
||||
{ name = "zsh-users/zsh-completions"; }
|
||||
{ name = "zsh-users/zsh-syntax-highlighting"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue