All Projects → vlaci → Nix Doom Emacs

vlaci / Nix Doom Emacs

Licence: mit
doom-emacs packaged for Nix

Labels

Projects that are alternatives of or similar to Nix Doom Emacs

Dotfiles
Configuration files for XMonad, Emacs, NixOS, Taffybar and more.
Stars: ✭ 127 (-3.79%)
Mutual labels:  nix, emacs
Dotfiles
well-tailored NixOS & nix-darwin dotfiles
Stars: ✭ 63 (-52.27%)
Mutual labels:  nix, emacs
Nix Mode
An Emacs major mode for editing Nix expressions.
Stars: ✭ 137 (+3.79%)
Mutual labels:  nix, emacs
Mypy boto3 builder
Type annotations builder for boto3 compatible with VSCode, PyCharm, Emacs, Sublime Text, pyright and mypy.
Stars: ✭ 123 (-6.82%)
Mutual labels:  emacs
Elmacro
Package to display keyboard macros or latest interactive commands as emacs lisp.
Stars: ✭ 126 (-4.55%)
Mutual labels:  emacs
Emacs Wttrin
Emacs frontend for weather web service wttr.in.
Stars: ✭ 129 (-2.27%)
Mutual labels:  emacs
Eval In Repl
Consistent ESS-like eval interface for various REPLs
Stars: ✭ 130 (-1.52%)
Mutual labels:  emacs
Wgeecn
Writing GNU Emacs Extensions 翻译
Stars: ✭ 124 (-6.06%)
Mutual labels:  emacs
Emacs Solaire Mode
If only certain buffers could be so grossly incandescent.
Stars: ✭ 129 (-2.27%)
Mutual labels:  emacs
Emacs Gitlab
A Gitlab client for Emacs
Stars: ✭ 128 (-3.03%)
Mutual labels:  emacs
Zsh Nix Shell
zsh plugin that lets you use zsh in nix-shell shells.
Stars: ✭ 130 (-1.52%)
Mutual labels:  nix
0blayout Mode
Small global-minor-mode to Emacs to handle several layouts
Stars: ✭ 128 (-3.03%)
Mutual labels:  emacs
Cmd Key Happy
Swap cmd and alt keys in Terminal (useful when running emacs over ssh)
Stars: ✭ 126 (-4.55%)
Mutual labels:  emacs
Emacs Smart Input Source
Less manual switch for native or OS input source (input method).
Stars: ✭ 130 (-1.52%)
Mutual labels:  emacs
Micro Ci
A tiny CI server built around GitHub and Nix
Stars: ✭ 126 (-4.55%)
Mutual labels:  nix
Psc Ide Emacs
Emacs integration for PureScript's psc-ide tool.
Stars: ✭ 130 (-1.52%)
Mutual labels:  emacs
Dotfiles
My small loan of configuration files and scripts - based on NixOS
Stars: ✭ 124 (-6.06%)
Mutual labels:  nix
Auto Complete
Emacs auto-complete package
Stars: ✭ 1,622 (+1128.79%)
Mutual labels:  emacs
Devshell
Per project developer environments
Stars: ✭ 129 (-2.27%)
Mutual labels:  nix
Emacs Gdscript Mode
An Emacs package to get GDScript support and syntax highlighting.
Stars: ✭ 132 (+0%)
Mutual labels:  emacs

nix-doom-emacs

Status
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, ... }:

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")
  '';
}

./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 = {
    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 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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].