From fadf0619eb97b643d61d7713222a1ea23e019064 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 14 Dec 2019 15:25:04 +0000 Subject: feat(tools/emacs): Build fully pre-configured Emacs 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. --- tools/emacs/default.nix | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'tools/emacs/default.nix') diff --git a/tools/emacs/default.nix b/tools/emacs/default.nix index b90693a859..0589b274e2 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)" +'' -- cgit 1.4.1