1 { inputs, pkgs, lib, config, ... }:
5 inputs.nix-doom-emacs.hmModule
7 programs.doom-emacs = {
10 "${config.home.homeDirectory}/.doom.d";
14 enable = lib.mkDefault true;
15 package = config.programs.emacs.finalPackage;
17 socketActivation.enable = true;
20 enable = lib.mkDefault true;
21 extraPackages = epkgs: [
25 fonts.fontconfig.enable = lib.mkDefault true;
26 home.packages = with pkgs; [
27 # DOOM Emacs dependencies
29 (ripgrep.override { withPCRE2 = true; })
35 #nodePackages.javascript-typescript-langserver
38 #emacs-all-the-icons-fonts
39 (nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
41 home.sessionPath = [ "${config.xdg.configHome}/emacs/bin" ];
42 home.sessionVariables = {
43 DOOMDIR = "${config.xdg.configHome}/doom";
44 DOOMLOCALDIR = "${config.xdg.dataHome}/doom";
45 DOOMPROFILELOADFILE = "${config.xdg.stateHome}/doom/load.el";
48 "doom/cli.el".text = lib.readFile emacs/cli.el;
49 "doom/config.el".text = lib.readFile emacs/config.el;
50 "doom/init.el".text = lib.readFile emacs/init.el;
51 "doom/packages.el".text = lib.readFile emacs/packages.el;
53 source = inputs.doom-emacs;
54 onChange = "${pkgs.writeShellScript "doom-change" ''
55 export DOOMDIR="${config.home.sessionVariables.DOOMDIR}"
56 export DOOMLOCALDIR="${config.home.sessionVariables.DOOMLOCALDIR}"
57 export DOOMPROFILELOADFILE="${config.home.sessionVariables.DOOMPROFILELOADFILE}"
58 if [ ! -d "$DOOMLOCALDIR" ]; then
59 ${config.xdg.configHome}/emacs/bin/doom install
61 ${config.xdg.configHome}/emacs/bin/doom sync -up
66 xresources.properties = {
67 #"Emacs.FontBackend" = "xft";