You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
László Vaskó cc495913ae
Point to maintained fork
5 months ago
.github/workflows github actions: action to update init.el 2 years ago
modules home-manager: set `services.emacs.package` only if it is defined 2 years ago
test/doom.d test/doom.d/init.el: Updating from hlissner/doom-emacs - 80c32eaa 2 years ago
LICENSE Initial commit 3 years ago Point to maintained fork 5 months ago
advice.el advice.el: make it compatible with newer doom revisions 2 years ago
default.nix Add a patch for restart-emacs 2 years ago
evil-escape.patch Nix expression to install and configure doom-emacs 3 years ago
fix-paths.patch elfeed: use `doom-cache-dir` which is outside of the nix store 3 years ago
flake-compat-helper.nix github actions: niv -> flakes 2 years ago
flake.lock org: package renamed, org-contrib added 2 years ago
flake.nix org: package renamed, org-contrib added 2 years ago
nix-integration.patch Fix nix-integration.patch. 2 years ago
overrides.nix org: package renamed, org-contrib added 2 years ago
restart-emacs.patch Add a patch for restart-emacs 2 years ago

⚠️ I no longer use or develop this package. Use the (nix-community)[] mirror instead.


Build on master Build Status on master
Build on develop Build Status on develop
Dependency updater Dependency Updater Status

Nix expression to install and configure doom-emacs.

The expression builds a doom-emacs distribution with dependencies pre-installed based on an existing ~/.doom.d directory.

It is not a fully fledged experience as some dependencies are not installed and some may not be fully compatible as the version available in NixOS or emacs-overlay may not be compatible with the doom-emacs requirements.

Getting started

Using home-manager:

{ pkgs, ... }:

  doom-emacs = pkgs.callPackage (builtins.fetchTarball {
    url =;
  }) {
    doomPrivateDir = ./doom.d;  # Directory containing your config.el init.el
                                # and packages.el files
in {
  home.packages = [ doom-emacs ];
  home.file.".emacs.d/init.el".text = ''
      (load "default.el")

./doom.d should contain the following three files: config.el, init.el and packages.el. If you don't already have an existing doom-emacs configuration, you can use the contents of test/doom.d as a template.

Using flake.nix:

  inputs = {
    home-manager.url = "github:rycee/home-manager";
    nix-doom-emacs.url = "github:vlaci/nix-doom-emacs";

  outputs = {
  }: {
    nixosConfigurations.exampleHost = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
          home-manager.users.exampleUser = { pkgs, ... }: {
            imports = [ nix-doom-emacs.hmModule ];
            programs.doom-emacs = {
              enable = true;
              doomPrivateDir = ./doom.d;

Under the hood

This expression leverages nix-straight.el under the hood for installing dependencies. The restrictions of that package apply here too.


instead of running emacs.d/bin/doom, once you have update your config files (packages.el, init.el, config.el), rebuild doom-emacs with nix. If you are using home-manager, simply run home-manager switch


On macOS on a fresh install, you might run into the error Too many files open. running ulimit -S -n 2048 will only work for the duration of your shell and will fix the error

Installing emacs packages

In the initial packages.el instructions for how to install packages can be found. However some packages might require a particular software dependency to be installed. Trying to install those would give you an error of the type: Searching for program: No such file or directory, git (Missing git dependency) Here is how you would go installing magit-delta for example (which requires git).

Under the line: doomPrivateDir = ./doom.d; in your configuration, you would add the following:

  emacsPackagesOverlay = self: super: {
     magit-delta = super.magit-delta.overrideAttrs (esuper: {
       buildInputs = esuper.buildInputs ++ [ pkgs.git ];

To make the git dependency available. trying to rebuild doom-emacs with home-manager switch should work correctly now.

Using the daemon

To use the daemon, simply enable the emacs service (with NixOS, home-manager or nix-darwin) and use the doom emacs package. doom-emacs will need to be referenced at the top of your config file.

services.emacs = {
  enable = true;
  package = doom-emacs;  # use programs.emacs.package instead if using home-manager

to connect to the daemon you can now run emacsclient -c