aboutsummaryrefslogblamecommitdiff
path: root/home/emacs/default.nix
blob: 96659dce61808fbcdaf93d9907a469d0663ddd63 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                               

  



                                                  

                                     
                         

                                                                           
                 






                                    
 
{ 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 ]))
      nixpkgs-fmt
    ];

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