29 lines
712 B
Nix
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"
|
|
];
|
|
};
|
|
}
|