summary refs log tree commit diff stats
path: root/user/modules
diff options
context:
space:
mode:
authorAlan Pearce2019-10-08 21:40:33 +0200
committerAlan Pearce2019-10-08 21:40:33 +0200
commit40fd4964068d0b7628b6f699dab4aec200eadb0a (patch)
treea81e6967ac8f40590a7d657c20f04ec5e2f5990a /user/modules
parentee00a9bddc0a5614a00198317b55437e9b6e7fdd (diff)
downloadnixfiles-40fd4964068d0b7628b6f699dab4aec200eadb0a.tar.lz
nixfiles-40fd4964068d0b7628b6f699dab4aec200eadb0a.tar.zst
nixfiles-40fd4964068d0b7628b6f699dab4aec200eadb0a.zip
Emacs: use single configuration file, compiled by home-manager
Diffstat (limited to 'user/modules')
-rw-r--r--user/modules/emacs.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/user/modules/emacs.nix b/user/modules/emacs.nix
index b6ac0395..9f542391 100644
--- a/user/modules/emacs.nix
+++ b/user/modules/emacs.nix
@@ -154,9 +154,11 @@ in
   home.sessionVariables = {
     EDITOR = "${editorScript}/bin/edit";
   };
-  home.file.".emacs.d/init.el".source = ../emacs/.emacs.d/init.el;
-  home.file.".emacs.d/main.el" = {
-    source = ../emacs/.emacs.d/main.el;
+  home.file.".emacs.d/init.el" = {
+    source = ../emacs/.emacs.d/init.el;
+    onChange = ''
+      ${config.programs.emacs.finalPackage}/bin/emacs -batch -f batch-byte-compile .emacs.d/init.el
+    '';
   };
   home.file.".emacs.d/eshell/" = {
     recursive = true;