Emacs

From NixOS Wiki
Revision as of 16:51, 8 July 2021 by imported>Yuu

For reference use the emacs chapter in the nixos manual.

Installation

Emacs overlay

As of July 2021, the Nix community offers 7 variants of GNU Emacs as overlays: emacsGit, emacsGcc, emacsPgtk, emacsPgtkGcc, emacsUnstable, emacsGit-nox, and emacsUnstable-nox. For installing one of them, add the following lines to /etc/nixos/configuration.nix (replace emacsPgtkGcc with the variant of your choice).

{
  services.emacs.package = pkgs.emacsPgtkGcc;

  nixpkgs.overlays = [
    (import (builtins.fetchGit {
      url = "https://github.com/nix-community/emacs-overlay.git";
      ref = "master";
      rev = "bfc8f6edcb7bcf3cf24e4a7199b3f6fed96aaecf"; # change the revision
    }))
  ];

  environment.systemPackages = with pkgs; [
    emacsPgtkGcc
  ];
}