{ 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; [ emacsPgtkGcc # 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="; }; }; }