modules.packages.zsh: enable fzf

This commit is contained in:
2025-12-21 09:00:10 +08:00
parent 58ea730d48
commit 1d6a352978

View File

@@ -34,38 +34,45 @@ inputs:
home.shell.enableZshIntegration = true;
}
{
programs.zsh = inputs.lib.mkIf
(builtins.elem home-inputs.config.home.username [ "chn" "root" "aleksana" "alikia" "hjp" "lilydjwg" ])
programs =
let optional =
inputs.lib.mkIf (builtins.elem home-inputs.config.home.username
[ "chn" "root" "aleksana" "alikia" "hjp" "lilydjwg" ]);
in
{
plugins =
[
{
file = "powerlevel10k.zsh-theme";
name = "powerlevel10k";
src = "${inputs.pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k";
}
{ file = "p10k.zsh"; name = "powerlevel10k-config"; src = ./p10k-config; }
{
name = "zsh-lsd";
src = inputs.pkgs.fetchFromGitHub
zsh = optional
{
plugins =
[
{
owner = "z-shell";
repo = "zsh-lsd";
rev = "65bb5ac49190beda263aae552a9369127961632d";
hash = "sha256-JSNsfpgiqWhtmGQkC3B0R1Y1QnDKp9n0Zaqzjhwt7Xk=";
};
}
];
initContent = inputs.lib.mkOrder 550
''
# p10k instant prompt
P10K_INSTANT_PROMPT="$XDG_CACHE_HOME/p10k-instant-prompt-''${(%):-%n}.zsh"
[[ ! -r "$P10K_INSTANT_PROMPT" ]] || source "$P10K_INSTANT_PROMPT"
HYPHEN_INSENSITIVE="true"
export PATH=~/bin:$PATH
zstyle ':vcs_info:*' disable-patterns "/nix/remote/*"
'';
oh-my-zsh.theme = "";
file = "powerlevel10k.zsh-theme";
name = "powerlevel10k";
src = "${inputs.pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k";
}
{ file = "p10k.zsh"; name = "powerlevel10k-config"; src = ./p10k-config; }
{
name = "zsh-lsd";
src = inputs.pkgs.fetchFromGitHub
{
owner = "z-shell";
repo = "zsh-lsd";
rev = "65bb5ac49190beda263aae552a9369127961632d";
hash = "sha256-JSNsfpgiqWhtmGQkC3B0R1Y1QnDKp9n0Zaqzjhwt7Xk=";
};
}
];
initContent = inputs.lib.mkOrder 550
''
# p10k instant prompt
P10K_INSTANT_PROMPT="$XDG_CACHE_HOME/p10k-instant-prompt-''${(%):-%n}.zsh"
[[ ! -r "$P10K_INSTANT_PROMPT" ]] || source "$P10K_INSTANT_PROMPT"
HYPHEN_INSENSITIVE="true"
export PATH=~/bin:$PATH
zstyle ':vcs_info:*' disable-patterns "/nix/remote/*"
'';
oh-my-zsh.theme = "";
};
fzf = optional { enable = true; };
};
}
];