github-actions[bot] 80fe76019c niv doom-emacs: update d88e0795 -> febf960c
## Changelog for doom-emacs:
Commits: [hlissner/doom-emacs@d88e0795...febf960c](d88e0795b6...febf960c4e)

* [`910e3bc1`](910e3bc1d9) config/default: update deprecated bindings
* [`719147cf`](719147cf8d) fix nix aspell installation instructions
* [`7d189efb`](7d189efb30) Bump :lang scheme
* [`d17616e8`](d17616e835) TAB = toggle section in magit-process-mode
* [`f11979ed`](f11979ed76) tools/pdf: only prompt to build epdfinfo once
* [`3fd1d03b`](3fd1d03b77) Bump :email wanderlust
* [`2e86cceb`](2e86cceb3f) Bump :lang
* [`ea207368`](ea207368d9) Bump :tools
* [`7d047dd8`](7d047dd8e0) Bump :ui
* [`7838e312`](7838e312e2) Bump :editor
* [`9137cbaa`](9137cbaaa4) Bump :completion
* [`a51be66d`](a51be66d30) Add word existence checking for +spell/correct
* [`448bff2f`](448bff2fd8) Implement cleaner version
* [`46525114`](4652511440) Fix hlissner/doom-emacs#4384: save server auth files to EMACSDIR
* [`65bd7c34`](65bd7c3414) Adds MDN search to online lookup
* [`fc9dd574`](fc9dd5748e) Fix hlissner/doom-emacs#4386: interop between ivy-xref & dired-do-find-regexp
* [`9e56927b`](9e56927b5f) Enable smartparens for `edebug-eval-expression'
* [`46ac4191`](46ac4191e1) Bump :tools debugger lsp
* [`a5af17b6`](a5af17b6aa) Fix hlissner/doom-emacs#4397: call pdf-tools-install-noverify
* [`c9dff2f9`](c9dff2f957) Bump :lang javascript
2020-12-26 13:49:24 +00:00
2020-11-01 09:51:49 +01:00
2019-10-23 13:25:43 +02:00
2020-12-04 18:08:07 +01:00

nix-doom-emacs

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 exprerience as some dependenices 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, ... }:

let
  doom-emacs = pkgs.callPackage (builtins.fetchTarball {
    url = https://github.com/vlaci/nix-doom-emacs/archive/master.tar.gz;
  }) {
    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")
  '';
}

Using flake.nix:

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

  outputs = {
    self,
    nixpkgs,
    home-manager,
    nix-doom-emacs,
    ...
  }: {
    nixosConfigurations.exampleHost = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        home-manager.nixosModules.home-manager
        {
          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 depdendencies. The restrictions of that package apply here too.

Usage

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

Troubleshooting

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

Description
doom-emacs packaged for Nix [maintainers=@ckiee,@thiagokokada]
Readme MIT 3.3 MiB
Languages
Nix 64.3%
Emacs Lisp 35.7%