diff --git a/core/core-packages.el b/core/core-packages.el index 2aef06503..9db7c87ee 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -286,11 +286,16 @@ byte-compilation." (setq doom-modules ',doom-modules) (unless noninteractive - (load "~/.emacs.local.el" t t) + ,(let ((private-init (doom-module-path :private user-login-name "init"))) + (when (file-exists-p (concat private-init ".el")) + `(load ,private-init t t))) ,@(let (forms) - (dolist (module (doom--module-pairs) (nreverse forms)) - (push `(require! ,(car module) ,(cdr module) t) forms))) + (dolist (module (doom--module-pairs)) + (push `(require! ,(car module) ,(cdr module) t) forms)) + (unless (doom-module-loaded-p :private (intern user-login-name)) + (push `(require! :private ,user-login-name t) forms)) + (nreverse forms)) (when (display-graphic-p) (require 'server) diff --git a/init.example.el b/init.example.el index 028020ef5..a3ecff510 100644 --- a/init.example.el +++ b/init.example.el @@ -110,7 +110,8 @@ twitter ; twitter client https://twitter.com/vnought write ; emacs as a word processor (latex + org + markdown) - ;; Private modules aren't tracked in source control (except for mine). - ;; Use it as a reference for your own. + ;; Private modules named after your username are loaded automatically. + ;; Leaving this here is harmless though. Also, they are omitted from + ;; source control (except for mine; use it as a reference). :private hlissner) diff --git a/modules/private/hlissner/init.el b/modules/private/hlissner/init.el new file mode 100644 index 000000000..f93d02361 --- /dev/null +++ b/modules/private/hlissner/init.el @@ -0,0 +1,21 @@ +;;; private/hlissner/init.el + +;; This is a special file, unique to private modules, that is loaded after DOOM +;; core but before any module is activated, giving you an opportunity to +;; overwrite variables or settings before initialization. + +;; host-specific settings +(load "~/.emacs.local.el" t t) + +(setq user-mail-address "henrik@lissner.net" + user-full-name "Henrik Lissner") + +(pcase system-name + ("proteus" + (setq +doom-modeline-height 25 + +doom-font (font-spec :family "Fira Mono" :size 10) + +doom-variable-pitch-font (font-spec :family "Fira Sans" :size 10) + +doom-unicode-font (font-spec :family "DejaVu Sans Mono" :size 10) + nlinum-format "%3d ")) + ("halimede" + (setq +doom-modeline-height 27)))