about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-12-14T15·25+0000
committerVincent Ambo <tazjin@google.com>2019-12-14T15·25+0000
commitfadf0619eb97b643d61d7713222a1ea23e019064 (patch)
tree6814c62d51eb13050fd4161889f739c4cf36670d /tools
parent7d03ab714059a05e4f841be379b7a5ba2d033b09 (diff)
feat(tools/emacs): Build fully pre-configured Emacs r/145
Builds an Emacs that is not only configured with the required packages
but with the entire Emacs configuration for my personal setup.

This means that `nix-env -iA tools.emacs` will install a
fully-configured Emacs that can be launched as the window manager from
my ~/.xsession.
Diffstat (limited to 'tools')
-rw-r--r--tools/emacs/default.nix25
1 files changed, 12 insertions, 13 deletions
diff --git a/tools/emacs/default.nix b/tools/emacs/default.nix
index b90693a85912..0589b274e242 100644
--- a/tools/emacs/default.nix
+++ b/tools/emacs/default.nix
@@ -1,11 +1,5 @@
-# This file assembles a preconfigured Emacs with the dependencies that
-# I need.
-#
-# It can either build Emacs itself (`-A complete`) or just the
-# configuration (`-A config`). If the configuration is built
-# separately (e.g. for work machines where Emacs itself is installed
-# by other means) it is important that the versions of Emacs are kept
-# in sync.
+# This file builds an Emacs pre-configured with the packages I need
+# and my personal Emacs configuration.
 
 { pkgs, ... }:
 
@@ -34,7 +28,7 @@ let
     };
   };
 
-  complete = (emacsWithPackages(epkgs:
+  tazjinsEmacs = (emacsWithPackages(epkgs:
   # Actual ELPA packages (the enlightened!)
   (with epkgs.elpaPackages; [
     ace-window
@@ -107,7 +101,12 @@ let
   # Custom packages
   [ carpMode ]
   ));
-in {
-  inherit complete;
-  depsOnly = complete.deps;
-}
+in third_party.writeShellScriptBin "tazjins-emacs" ''
+  exec ${tazjinsEmacs}/bin/emacs \
+    --debug-init \
+    --no-site-file \
+    --no-site-lisp \
+    --no-init-file \
+    --directory ${./config} \
+    --eval "(require 'init)"
+''