summaryrefslogtreecommitdiff
path: root/modules/nixos/emacs.nix
blob: 8163c452baa620c83214bd8b270f576d2ebc7da6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
  config,
  lib,
  ...
}:
with lib; let
  cfg = config.nixfiles.modules.emacs;
in {
  config = mkIf cfg.enable {
    nixfiles.modules = {
      common.xdg.defaultApplications.emacsclient = [
        "application/atom+xml"
        "application/json"
        "application/rss+xml"
        "application/schema+json"
        "application/xhtml+xml"
        "application/xml"
        "text/csv"
        "text/plain"
      ];

      x11.enable = true;
    };

    hm.services.emacs = {
      enable = true;
      client.enable = true;
      socketActivation.enable = true;
    };
  };
}