doomemacs/modules/config/private/init.el
Henrik Lissner 23fda88b2f
Detach doom-modules-dirs from doom! macro
Formerly, you were required to have a doom! call (even a blank one) in
~/.doom.d/init.el if you wanted to have private sub-modules in
~/.doom.d/modules/.

No more. It is no longer doom!'s responsibility to affect
`doom-modules-dirs`. This is now done by :config private, while the
Doom modules directory is now the initial entry in doom-modules-dirs.
2018-03-12 13:32:00 -04:00

20 lines
705 B
EmacsLisp

;;; config/private/init.el -*- lexical-binding: t; -*-
(defvar +private-config-path
(if (featurep! +xdg)
(expand-file-name "doom/" (or (getenv "XDG_CONFIG_HOME") "~/.config"))
"~/.doom.d")
"The directory that serves as the root of your external private config for
Doom Emacs.")
;; Ensure `doom//reload-autoloads', `doom//byte-compile' and
;; `doom-initialize-packages' will treat `+private-config-path' as the root of
;; this module.
(cl-pushnew +private-config-path doom-psuedo-module-dirs)
(cl-pushnew (expand-file-name "modules/" +private-config-path)
doom-modules-dirs :test #'string=)
;;
(load (expand-file-name "init.el" +private-config-path)
'noerror 'nomessage)