about summary refs log tree commit diff
path: root/modules/workstation/emacs/default.nix
blob: 1990cda60571c42378da01572f19182b0b29a6a2 (plain) (blame)
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
32
33
34
{ pkgs, ... }:

{
  environment.systemPackages = with pkgs; [
    ((emacsPackagesFor emacs-pgtk).emacsWithPackages (epkgs: with epkgs; [
      adoc-mode
      cmake-mode
      direnv
      dockerfile-mode
      eglot
      go-mode
      magit
      markdown-mode
      meson-mode
      monokai-theme
      nix-mode
      rainbow-delimiters
      rust-mode
    ]))
  ];

  home.qyliss.dirs."state/emacs" = {};

  users.users.qyliss.xdg.config.paths."emacs" = with pkgs;
    runCommandNoCC ".emacs.d" {
      nativeBuildInputs = [ emacs-pgtk ];
    } ''
      cp ${./early-init.el} early-init.el
      cp ${./init.el} init.el
      emacs -L . --batch -f batch-byte-compile *.el
      install -d $out
      install *.el *.elc $out
    '';
}