home: zsh: don't hard-code '$XDG_CONFIG_HOME'
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f1a7e9fd93
commit
2d2f729138
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue