Files
nix/hosts/common/user/configs/console/zsh/default.nix
2024-07-16 17:46:58 +03:00

29 lines
712 B
Nix

{
username ? throw "username argument is required",
}:
{ config, ... }:
let
userConfig = config.users.users.${username};
hmConfig = config.home-manager.users.${username};
in
{
home-manager.users.${username} = {
programs.zsh = {
enable = true;
dotDir = "${hmConfig.xdg.relativeConfigHome}/zsh";
autocd = true;
history = {
path = "${hmConfig.xdg.dataHome}/zsh/history";
expireDuplicatesFirst = true;
};
historySubstringSearch.enable = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
};
home.persistence."/persist${userConfig.home}".directories = [
"${hmConfig.xdg.relativeDataHome}/zsh"
];
};
}