Expand xdg config

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-06-23 16:39:46 +03:00
parent e7d328cab5
commit 3d503fd1c2
11 changed files with 97 additions and 52 deletions

View File

@@ -1,13 +1,16 @@
{ user ? throw "user argument is required" }: { ... }:
{ user ? throw "user argument is required" }: { config, ... }:
let
hmConfig = config.home-manager.users."${user.name}";
in
{
home-manager.users."${user.name}" = {
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
dotDir = "${hmConfig.xdg.relativeConfigHome}/zsh";
autocd = true;
history = {
path = "${user.home}/.local/share/zsh/history";
path = "${hmConfig.xdg.dataHome}/zsh/history";
expireDuplicatesFirst = true;
};
historySubstringSearch.enable = true;
@@ -15,6 +18,6 @@
syntaxHighlighting.enable = true;
};
home.persistence."/persist${user.home}".directories = [ ".local/share/zsh" ];
home.persistence."/persist${user.home}".directories = [ "${hmConfig.xdg.relativeDataHome}/zsh" ];
};
}