home: zsh: don't hard-code '$XDG_CONFIG_HOME'
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Bruno BELANYI 2023-03-08 14:36:27 +00:00
parent f1a7e9fd93
commit 2d2f729138
1 changed files with 9 additions and 1 deletions

View File

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