home: zsh: don't hard-code '$XDG_CONFIG_HOME'
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bruno BELANYI 2023-03-08 14:36:27 +00:00
parent f1a7e9fd93
commit 2d2f729138

View file

@ -1,6 +1,14 @@
{ 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; {
@ -16,7 +24,7 @@ in
programs.zsh = { programs.zsh = {
enable = true; enable = true;
dotDir = ".config/zsh"; # Don't clutter $HOME dotDir = "${relativeXdgConfig}/zsh"; # Don't clutter $HOME
enableCompletion = true; enableCompletion = true;
history = { history = {