github-actions[bot] 02c8b4f4d3 niv doom-emacs: update febf960c -> 0c925641
## Changelog for doom-emacs:
Commits: [hlissner/doom-emacs@febf960c...0c925641](febf960c4e...0c9256411d)

* [`1b6b1223`](1b6b122317) Bump :tools magit
* [`55e90f06`](55e90f064f) Load gcmh-mode a little sooner
* [`f0a5d454`](f0a5d454c5) Bind useful magit-file-dispatch
* [`a3b8be52`](a3b8be52a8) Improve doom/help-packages
* [`96d7e50f`](96d7e50f3e) Distinguish <C-i> from "C-i"
* [`2c646df0`](2c646df027) Initialize more straight state in doom-initialize-packages
* [`863063b6`](863063b60d) Defer internal help & help-mode packages
* [`07db84bf`](07db84bfe2) Don't chase symlinks
* [`3c8a2a65`](3c8a2a655f) Fix envvar file encoding for Windows users
* [`2772ca8e`](2772ca8e70) Conditionally switch to insert mode on snippet expansion
* [`8edabbec`](8edabbecfa) Add kbd! alias for general-simulate-key macro
* [`d149c59d`](d149c59d2e) Add emacs mode checks to insert mode checks
* [`10f1b804`](10f1b8040a) Remove extraneous newline in doom/help-packages output
* [`4281a772`](4281a772b1) Revise core lib docstrings for clarity
* [`1fba2ea3`](1fba2ea303) Bump :emacs vc
* [`7053bfbe`](7053bfbeb7) Add "python3" to possible names for the python binary
* [`09f35970`](09f3597069) Update link for nose.el
* [`61135f53`](61135f5374) Enable `smartparens' for `evil-ex'
* [`621cb60e`](621cb60e75) Workaround: fix goto definition on modules
* [`0d330f7a`](0d330f7a7e) `doom/help-modules': C-u -> browse directory
* [`784acaa6`](784acaa64d) Set ligratures for csharp-mode
* [`d2005ab5`](d2005ab5da) docs/api: add cmds! & kbd! demos
* [`144714e7`](144714e7f5) Add popup rule for flycheck error list
* [`c4a0174f`](c4a0174fe2) ivy-read-action-format-function = ivy-hydra-read-action
* [`765b6dcf`](765b6dcfca) Unset unused markers
* [`89db5976`](89db59769d) Re-enable ivy in evil-ex completion
* [`6075e6f1`](6075e6f143) Refactor initialization of package state
* [`97d8de81`](97d8de81fe) Remove defunct straight-fix-org setting
* [`20c873d4`](20c873d45b) Update flycheck on idle-change
* [`09ac5a48`](09ac5a48c1) Add org-export-async-debug to debug vars
* [`eea47093`](eea4709354) cli: run post-script indirectly
* [`5d349657`](5d3496575c) Fix hlissner/doom-emacs#4421: masquerade doom/escape as keyboard-quit
* [`930524f3`](930524f3ac) Apply spell-fu blacklist to derived modes
* [`fc955f41`](fc955f4100) Don't set a default ispell-dictionary
* [`2e61fbbf`](2e61fbbf08) Fix hlissner/doom-emacs#4407: regression in +markdown-flyspell-word-p
* [`99a83ca1`](99a83ca18f) A workaround for formatting org mode
* [`9c510159`](9c510159ff) popup.el: consider auto-saving indirect buffers too
* [`cd37300c`](cd37300cc0) Bump :lang rust
* [`65416ff4`](65416ff472) Fix hlissner/doom-emacs#4427: ivy-read-action-format-function = ivy-read-action-format-columns
* [`084defb1`](084defb165) Reset sp-pair-overlay-keymap for evil users
* [`04b29c70`](04b29c70d2) doom/escape: change this-command only if interactive
* [`d69d2457`](d69d245778) Remove sp-escape-quotes-after-insert hack
* [`58279850`](5827985085) Don't increase gc-cons-threshold in org-mode
* [`49f3bc19`](49f3bc193a) Fix hlissner/doom-emacs#4430: wrong-num-of-args error on expand-region
* [`9490d42c`](9490d42cd3) Comment revision
* [`8c397902`](8c397902bc) Fix hlissner/doom-emacs#4432: comp-deferred-compilation-{black,deny}-list
* [`a4392b2c`](a4392b2c0d) Fix hlissner/doom-emacs#4431: don't use // in [JT]SX markup
* [`55c37710`](55c37710f5) Do not panic when xclip is not available
* [`e7696893`](e7696893f4) ivy-read-action-function = ivy-hydra-read-action
* [`8afd8a6c`](8afd8a6ce8) Restore user ability to toggle ivy related hydras
* [`715c7368`](715c736815) Prioritize company-capf back-end in org-journal
2021-01-16 16:12:17 +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%