about summary refs log tree commit diff
path: root/home/emacs/default.nix
blob: 4ea337e33f01ce8a479cabf46f45a9611ce266a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ lib, config, pkgs, ... }:
let cfg = config.my.home.emacs;
in
{
  options.my.home.emacs = with lib; {
    enable = mkEnableOption "emacs configuration";
  };

  config.home = lib.mkIf cfg.enable {
    packages = with pkgs; [
      emacsPgtkNativeComp
      # see https://github.com/hlissner/doom-emacs/issues/4138
      (aspellWithDicts (dicts: with dicts; [ en en-computers en-science ]))
    ];

    sessionVariables = {
      EDITOR = "emacsclient -c -a=";
      VISUAL = "emacsclient -c -a=";
    };
  };
}