Files
FxNet/modules/hm/zsh.nix
2025-09-16 19:51:36 +03:00

75 lines
1.5 KiB
Nix

{
lib,
pkgs,
config,
...
}:
{
home.packages = lib.mkIf config.programs.zsh.enable (with pkgs; [ zsh-powerlevel10k ]);
programs.zsh = {
autosuggestion = {
enable = true;
strategy = [
"history"
"completion"
];
};
syntaxHighlighting.enable = lib.mkDefault true;
autocd = true;
# defaultKeymap = "vicmd";
dirHashes = { };
shellAliases = {
"ll" = "ls -l";
"sc" = "systemctl";
"ssc" = "sudo systemctl";
"scu" = "systemctl --user";
};
shellGlobalAliases = {
UUID = "$(uuidgen | tr -d \\n)";
G = "| grep";
};
zsh-abbr = {
enable = true;
abbreviations = {
};
globalAbbreviations = {
};
};
oh-my-zsh = {
enable = lib.mkDefault true;
plugins = [
"git"
"ssh"
"sudo"
"z"
"golang"
"direnv"
"kubectl"
"docker"
"docker-compose"
"helm"
"themes"
"aliases"
"alias-finder"
"rsync"
"z"
];
# theme = lib.mkDefault "powerlevel10k/powerlevel10k";
};
initContent = ''
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
source ~/.p10k.zsh
zstyle ':omz:plugins:alias-finder' autoload yes
zstyle ':omz:plugins:alias-finder' longer no
zstyle ':omz:plugins:alias-finder' exact yes
zstyle ':omz:plugins:alias-finder' cheaper yes
'';
};
}