summary refs log tree commit diff stats
path: root/user/modules
diff options
context:
space:
mode:
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;