From a7834176eccca0e4afb6acc65c7966b7e2353e35 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 8 Dec 2019 20:11:13 -0500 Subject: [PATCH] Don't use zsh/rc.d system Instead, we just have zsh read $XDG_CONFIG_HOME/*/{aliases,env}.zsh files. --- config/zsh/.zshenv | 2 +- config/zsh/.zshrc | 2 +- modules/editors/emacs.nix | 5 +++-- modules/editors/vim.nix | 2 +- modules/shell/git.nix | 4 +--- modules/shell/ncmpcpp.nix | 5 +---- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/config/zsh/.zshenv b/config/zsh/.zshenv index 2c5acda7..16852bbf 100644 --- a/config/zsh/.zshenv +++ b/config/zsh/.zshenv @@ -2,7 +2,7 @@ for dir in $XDG_CONFIG_HOME/*/bin(N); do export PATH="$dir:$PATH" done -for file in $XDG_CONFIG_HOME/zsh/rc.d/env.*.zsh(N); do +for file in $XDG_CONFIG_HOME/*/env.zsh(N); do source $file done diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index 2d1f14a9..e0a61969 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -21,7 +21,7 @@ source $ZDOTDIR/config.zsh source $ZDOTDIR/keybinds.zsh source $ZDOTDIR/completion.zsh source $ZDOTDIR/aliases.zsh -for file in $XDG_CONFIG_HOME/zsh/rc.d/aliases.*.zsh(N); do +for file in $XDG_CONFIG_HOME/*/aliases.zsh(N); do source $file done diff --git a/modules/editors/emacs.nix b/modules/editors/emacs.nix index fb003cb5..861f23ff 100644 --- a/modules/editors/emacs.nix +++ b/modules/editors/emacs.nix @@ -20,7 +20,8 @@ in fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ]; home-manager.users.hlissner.xdg.configFile = { - "zsh/rc.d/aliases.emacs.zsh".source = ; - "zsh/rc.d/env.emacs.zsh".source = ; + # Avoid "emacs" because Emacs HEAD respects XDG conventions and we're only + # using this directory to store extra zsh config for my nix dotfiles. + "emacscfg" = { source = ; recursive = true; }; }; } diff --git a/modules/editors/vim.nix b/modules/editors/vim.nix index 3b3f748b..ead2cae3 100644 --- a/modules/editors/vim.nix +++ b/modules/editors/vim.nix @@ -14,6 +14,6 @@ }; home-manager.users.hlissner.xdg.configFile = { - "zsh/rc.d/aliases.vim.zsh".source = ; + "vim" = { source = ; recursive = true; }; }; } diff --git a/modules/shell/git.nix b/modules/shell/git.nix index f33d9e04..5f4b447a 100644 --- a/modules/shell/git.nix +++ b/modules/shell/git.nix @@ -7,8 +7,6 @@ ]; home-manager.users.hlissner.xdg.configFile = { - "git/config".source = ; - "git/ignore".source = ; - "zsh/rc.d/aliases.git.zsh".source = ; + "git" = { source = ; recursive = true; }; }; } diff --git a/modules/shell/ncmpcpp.nix b/modules/shell/ncmpcpp.nix index aaf392cd..2c05d2ea 100644 --- a/modules/shell/ncmpcpp.nix +++ b/modules/shell/ncmpcpp.nix @@ -6,9 +6,6 @@ ]; home-manager.users.hlissner.xdg.configFile = { - "zsh/rc.d/aliases.ncmpcpp.zsh".source = ; - "zsh/rc.d/env.ncmpcpp.zsh".source = ; - "ncmpcpp/config".source = ; - "ncmpcpp/bindings".source = ; + "ncmpcpp" = { source = ; recursive = true; }; }; }