summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--emacs/.emacs.d/Makefile7
-rw-r--r--zsh/.config/zsh/.zshenv1
2 files changed, 6 insertions, 2 deletions
diff --git a/emacs/.emacs.d/Makefile b/emacs/.emacs.d/Makefile
index 7741ef3..9f086ff 100644
--- a/emacs/.emacs.d/Makefile
+++ b/emacs/.emacs.d/Makefile
@@ -1,5 +1,6 @@
 define EMACS_TANGLE
 (progn\
+  (require 'package)\
   (package-refresh-contents nil)\
   (setq vc-follow-symlinks nil)\
   (find-file \"init.org\")\
@@ -7,6 +8,8 @@ define EMACS_TANGLE
   (org-babel-tangle nil \"init.el\"))
 endef
 
+EMACS := ${NIX_LINK}/bin/emacs
+
 # The first target is the default.  `all` is typically defined here.
 all: init.elc
 
@@ -14,10 +17,10 @@ all: init.elc
 .PHONY: all clean
 
 init.el:
-	@emacs --batch --no-init-file --eval "$(EMACS_TANGLE)" --kill
+	$(EMACS) --batch --no-init-file --eval "$(EMACS_TANGLE)" --kill
 
 init.elc: init.el
-	@emacs --batch --no-init-file --funcall batch-byte-compile init.el
+	$(EMACS) --batch --no-init-file --funcall batch-byte-compile init.el
 
 clean:
 	rm init.el init.elc
diff --git a/zsh/.config/zsh/.zshenv b/zsh/.config/zsh/.zshenv
index 87dda38..f82d0a2 100644
--- a/zsh/.config/zsh/.zshenv
+++ b/zsh/.config/zsh/.zshenv
@@ -18,6 +18,7 @@ then
   if [[ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]]
   then
     . $HOME/.nix-profile/etc/profile.d/nix.sh;
+    export NIX_LINK
   fi
 
   case $OSTYPE in