39 lines
1019 B
Nix
39 lines
1019 B
Nix
{ user, home }:
|
|
{ config, pkgs, ... }:
|
|
{
|
|
environment = {
|
|
persistence."/persist/state"."${home}/.local/share/zsh" = { };
|
|
# If we set this under home-manager.users.${user}.home.sessionVariables,
|
|
# it runs too late in the init process and zsh fails.
|
|
sessionVariables.ZDOTDIR = "$HOME/.config/zsh";
|
|
};
|
|
|
|
home-manager.users.${user} = {
|
|
programs.zsh = {
|
|
enable = true;
|
|
dotDir = "${home}/.config/zsh";
|
|
autocd = true;
|
|
history = {
|
|
path = "${home}/.local/share/zsh/history";
|
|
expireDuplicatesFirst = true;
|
|
append = true;
|
|
};
|
|
historySubstringSearch.enable = true;
|
|
autosuggestion.enable = true;
|
|
syntaxHighlighting.enable = true;
|
|
plugins = [
|
|
{
|
|
name = "powerlevel10k";
|
|
src = pkgs.zsh-powerlevel10k;
|
|
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
|
}
|
|
];
|
|
initContent = ''
|
|
source ${./.p10k.zsh}
|
|
'';
|
|
};
|
|
|
|
home.file.".zshenv".enable = false;
|
|
};
|
|
}
|