init
This commit is contained in:
46
modules/home/zsh/default.nix
Normal file
46
modules/home/zsh/default.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{ username, pkgs, ... }:
|
||||
{
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases = {
|
||||
la = "ls -la";
|
||||
ll = "ls -l";
|
||||
"nixos-switch" = "sudo nixos-rebuild switch --flake /home/${username}/.nix";
|
||||
f = "fuck";
|
||||
};
|
||||
|
||||
history.size = 10000;
|
||||
history.ignoreAllDups = true;
|
||||
history.path = "$HOME/.zsh_history";
|
||||
history.ignorePatterns = [ "rm *" "pkill *" "cp *" ];
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" "sudo" "docker" "docker-compose" ];
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = pkgs.zsh-powerlevel10k;
|
||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
}
|
||||
{
|
||||
name = "powerlevel10k-config";
|
||||
src = ./powerlevel10k;
|
||||
file = "p10k.zsh";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
thefuck = {
|
||||
enable = true;
|
||||
enableZshIntegration = true; # 自动为 Zsh 设置别名 (通常是 'fuck')
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user