This Emacs distribution is made in such a way that it can also be installed via nix. It’s written in regular emacs lisp, is split into multiple elisp files and is based on emacs-bootstrap. It’s made by concatenating elisp files with nix, which can be done because all packages are installed using use-package and thus should be position-independent
You can install this distribution using nix like this:
nix-env -if https://github.com/crazazy/EMACS/archive/master.tar.gz -A
You can also just use this repository as your .emacs.d like so:
git clone https://github.com/crazazy/EMACS ~/.emacs.d
Do keep in mind that only a subset of all the modules are enabled like this, as I found emacs to be quite slow when compiling files itself!
The nix side of this project has been designed to support your own elisp config! This way you can quickly compile your emacs distribution, as nix compiles elisp files faster than emacs does. However, there are some limitations that apply when using this emacs framework:
- you only use
use-package
to import external packages - you don’t use
:ensure
to change what package your actually pulling from the package archives - all the packages that you’re pulling come from either elpa or melpa (stable or unstable)
If you want to change some of the settings that have been made to this emacs, feel free to copy _base.el into your own config directory, under the same name. Make sure the following code is in your _base.el
(require 'use-package)
(setq use-package-always-ensure nil)
This prevents use-package from using package.el
, which we don’t need since we’re providing all the packages we need to use-package already via nix.
By default, this distribution comes with support for most of the languages emacs-bootstrap comes with, this is C/C++, Go, haskell, javascript, php, python, racket, ruby, rust and webdev in general. For quick tips you should consult the emacs-bootstrap readme. Generally mode-specific commands are mapped under C-c, and which-key can help you find out what each key combination does.
Additionally, god-mode can be enabled using the ,
key. to exit god-mode, press C-g
. If that doesn’t work, type M-x evil-god-state-bail