Add config/private; for ~/.doom.d & ~/.config/doom support #406

A modules/ submodule will be symlinked to ~/.emacs.d/modules/private.
This commit is contained in:
Henrik Lissner 2018-02-14 23:18:10 -05:00
parent 6d7db48dc1
commit b3dcba54eb
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
7 changed files with 133 additions and 36 deletions

View file

@ -0,0 +1,15 @@
;; -*- no-byte-compile: t; -*-
;;; config/private/packages.el
(when (file-directory-p +private-modules-path)
;; automatically symlinks your private modules to `doom-modules-dir'.
(let ((symlink (expand-file-name +private-module-prefix doom-modules-dir)))
(if (and (file-directory-p symlink)
(not (file-symlink-p symlink)))
(lwarn "config/private" :warning
"modules/%s already exists; can't create symlink" +private-module-prefix)
(make-symbolic-link +private-modules-path symlink t))))
;;
(load (expand-file-name "packages.el" +private-config-path)
'noerror 'nomessage)