### Changes for doom-emacs On branch: master Commits:d41cff489f...258104f750
- [3f5c111b](3f5c111b42
) dev: revise warnings in issue templates - [76406313](7640631300
) docs(bidi): fix #+DATE field in readme - [c183aa71](c183aa7174
) fix(everywhere): inhibit local-vars hooks - [65ff2636](65ff263668
) fix(vertico): backspace keybind for tty users - [488ad07c](488ad07cc5
) fix(evil): define *-any-quote directly - [6bf72583](6bf725837d
) fix(fortran): account for spaces in filenames - [56686f67](56686f677a
) fix(lib): improper quoting in restart-emacs command - [05974662](0597466261
) release(modules): 22.05.0-dev - [3b789752](3b789752a3
) fix: user/system git config breaking straight installer - [47269c50](47269c506c
) dev: auto-add issues to project board - [7a305825](7a30582505
) dev: use doomemacs/ci@legacy - [dcf3e873](dcf3e873bf
) dev: update labels in issue templates - [0db9014e](0db9014e89
) dev: fix link to third party resources - [0f6a653a](0f6a653a13
) dev(ci): use doomemacs/ci commit linter - [47d1b823](47d1b82382
) tweak(ci): generalize commit linter defaults - [ab138c0b](ab138c0b32
) dev(ci): read scopes from local modules/docs - [03bed00f](03bed00fd3
) dev: remove pull request template - [64b0e422](64b0e42260
) docs: update repo links in readme - [258104f7](258104f750
) refactor(lsp): remove emacs 26 workarounds Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
nix-doom-emacs
Status | |
---|---|
Build on master |
|
Build on develop |
|
Dependency updater |
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, ... }:
let
doom-emacs = pkgs.callPackage (builtins.fetchTarball {
url = https://github.com/nix-community/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 ];
}
./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:nix-community/nix-doom-emacs";
};
outputs = {
self,
nixpkgs,
lib,
home-manager,
nix-doom-emacs,
...
}: {
nixosConfigurations.exampleHost = lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
({
home-manager.users.exampleUser = lib.mkMerge [
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.
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