Files
nix/hosts/common/configs/user/console/zsh/default.nix
Nikolaos Karaolidis 31f3364f06 Add go devshell
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-01-06 13:44:43 +02:00

42 lines
979 B
Nix

{
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{ config, pkgs, ... }:
{
environment = {
sessionVariables.ZDOTDIR = "$HOME/.config/zsh";
persistence."/persist"."${home}/.local/share/zsh" = { };
};
home-manager.users.${user} = {
imports = [ ./options.nix ];
programs.zsh = {
enable = true;
dotDir = ".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";
}
];
initExtra = ''
source ${./.p10k.zsh}
'';
};
home.file.".zshenv".enable = false;
};
}