Too many bugs to deal with unfortunately. Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
31 lines
766 B
Nix
31 lines
766 B
Nix
{
|
|
username ? throw "username argument is required",
|
|
}:
|
|
{ config, ... }:
|
|
let
|
|
hmConfig = config.home-manager.users.${username};
|
|
in
|
|
{
|
|
environment = {
|
|
sessionVariables.ZDOTDIR = "$HOME/.config/zsh";
|
|
persistence."/persist".users.${username}.directories = [ "${hmConfig.xdg.relativeDataHome}/zsh" ];
|
|
};
|
|
|
|
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.file.".zshenv".enable = false;
|
|
};
|
|
}
|