1 { inputs, pkgs, lib, config, ... }:
5 inputs.nix-doom-emacs.hmModule
7 programs.doom-emacs = {
10 "${config.home.homeDirectory}/.doom.d";
15 package = config.programs.emacs.package;
17 socketActivation.enable = true;
19 fonts.fontconfig.enable = lib.mkDefault true;
20 home.packages = with pkgs; [
21 # DOOM Emacs dependencies
23 #(ripgrep.override { withPCRE2 = true; })
29 #nodePackages.javascript-typescript-langserver
33 emacs-all-the-icons-fonts
35 home.sessionPath = [ "${config.xdg.configHome}/emacs/bin" ];
36 home.sessionVariables = {
37 DOOMDIR = "${config.xdg.configHome}/doom-config";
38 DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
41 "doom-config/cli.el".text = lib.readFile emacs/cli.el;
42 "doom-config/config.el".text = lib.readFile emacs/config.el;
43 "doom-config/init.el".text = lib.readFile emacs/init.el;
44 "doom-config/packages.el".text = lib.readFile emacs/packages.el;
46 source = inputs.doom-emacs;
47 onChange = "${pkgs.writeShellScript "doom-change" ''
48 export DOOMDIR="${config.home.sessionVariables.DOOMDIR}"
49 export DOOMLOCALDIR="${config.home.sessionVariables.DOOMLOCALDIR}"
50 if [ ! -d "$DOOMLOCALDIR" ]; then
51 ${config.xdg.configHome}/emacs/bin/doom -y install
53 ${config.xdg.configHome}/emacs/bin/doom -y sync -u
58 xresources.properties = {
59 #"Emacs.FontBackend" = "xft";