From bad05536147b37442f9351570f06f252903a8c58 Mon Sep 17 00:00:00 2001 From: Christopher James Hayward Date: Sun, 31 Jan 2021 18:38:45 -0500 Subject: [PATCH] Dynamic host / modules --- init.el | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/init.el b/init.el index ce24063..6cb8082 100644 --- a/init.el +++ b/init.el @@ -1,9 +1,8 @@ -;; NOTE: This file is tangled from README.org -(defconst IS-LINUX (eq system-type 'gnu/linux)) -(defconst IS-WINDOWS (memq system-type '(cygwin ms-dos windows-nt))) +(let ((host-file (concat "~/.local/source/dotfiles/hosts/" system-name ".el"))) + (when (file-exists-p host-file) + (load-file host-file))) -(load-file "~/.local/source/dotfiles/modules/core.el") -(load-file "~/.local/source/dotfiles/modules/desktop.el") -(load-file "~/.local/source/dotfiles/modules/writing.el") -(load-file "~/.local/source/dotfiles/modules/projects.el") -(load-file "~/.local/source/dotfiles/modules/interface.el") +(dolist (m dotfiles/modules) + (let ((mod-file (concat "~/.local/source/dotfiles/modules/" (symbol-name m) ".el"))) + (when (file-exists-p mod-file) + (load-file mod-file))))