home: zsh: use absolute path to 'XDG_CONFIG_HOME'
All checks were successful
ci/woodpecker/push/check Pipeline was successful

The path handling has been fixed upstream, which makes this module more
readable.
This commit is contained in:
Bruno BELANYI 2025-07-27 20:48:06 +01:00
parent add7967685
commit 2a515754a2

View file

@ -1,14 +1,6 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
cfg = config.my.home.zsh; cfg = config.my.home.zsh;
# Have a nice relative path for XDG_CONFIG_HOME, without leading `/`
relativeXdgConfig =
let
noHome = lib.removePrefix config.home.homeDirectory;
noSlash = lib.removePrefix "/";
in
noSlash (noHome config.xdg.configHome);
in in
{ {
options.my.home.zsh = with lib; { options.my.home.zsh = with lib; {
@ -57,7 +49,7 @@ in
programs.zsh = { programs.zsh = {
enable = true; enable = true;
dotDir = "${relativeXdgConfig}/zsh"; # Don't clutter $HOME dotDir = "${config.xdg.configHome}/zsh"; # Don't clutter $HOME
enableCompletion = true; enableCompletion = true;
history = { history = {