d4ncer / .emacs.d-1

My personal Emacs configuration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emacs Config

My personal Emacs configuration. It’s a chonker.

I don’t recommend anyone else actually uses this as-is since it’s a personal setup that I change regularly. But the overall structure works well, and I’ve had a few coworkers fork and riff on this–it’s less magic than some of the popular community Emacs setups.

It demonstrates how to:

  • dynamically load config files from a directory using just use-package
  • split your configuration up, to keep config separate from vendored code
  • use Nix to build a self-contained Emacs with the 3rd party packages and utilities it needs

Installation

Nix is used to build an Emacs along with 3rd-party Lisp packages and required programs.

nix-build
./result/bin/emacs

The derivation can be imported into a NixOS or home-manager configuration using the usual mechanisms. Doing this would allow you to add this Emacs to your Nix profile for normal use.

{ pkgs, ... }:
{
  nixpkgs.overlays = [
    (self: super:
    {
      emacsCustom = builtins.fetchTarball rec {
        rev = "master";
        url = "https://github.com/chrisbarrett/.emacs.d/archive/${rev}.tar.gz";
      };
    })
  ];

  home.packages = [
    # Installs to ~/.nix-profile/bin/{emacs,emacsclient}
    pkgs.emacsCustom
  ];
}

About

My personal Emacs configuration.


Languages

Language:Emacs Lisp 62.1%Language:Nix 22.0%Language:YASnippet 14.9%Language:Makefile 0.7%Language:Shell 0.2%Language:HTML 0.1%