aboutsummaryrefslogtreecommitdiff
path: root/home-manager/programs/emacs/default.nix
blob: d74c93ac83e98026745d2bc3450d103087c40c2f (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
{ pkgs, ... }:
let
  service = {
    client = {
      enable = true;
      arguments = [ "-c" "-a emacs" ];
    };
    defaultEditor = true;
    startWithUserSession = "graphical";
    package = pkgs.emacs-gtk;
  };
  configs = {
    "emacs/init.el".text = builtins.readFile ./init.el;
    "emacs/early-init.el".text = builtins.readFile ./init.el;
  };
in
{
  services.emacs = {
    enable = true;
    inherit (service);
  };
  programs.emacs = {
    enable = true;
    inherit (service) package;
  };
  xdg.configFile = {
    inherit (configs); 
  };
}