Files
nix/hosts/common/user/configs/console/zsh/default.nix
Nikolaos Karaolidis d54df170cd Remove impermanence home-manager module
Too many bugs to deal with unfortunately.

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2024-07-31 15:33:04 +03:00

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;
};
}