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
40 home.sessionPath = [ "${config.xdg.configHome}/emacs/bin" ];
41 home.sessionVariables = {
42 DOOMDIR = "${config.xdg.configHome}/doom-config";
43 DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
46 "doom-config/cli.el".text = lib.readFile emacs/cli.el;
47 "doom-config/config.el".text = lib.readFile emacs/config.el;
48 "doom-config/init.el".text = lib.readFile emacs/init.el;
49 "doom-config/packages.el".text = lib.readFile emacs/packages.el;
51 source = inputs.doom-emacs;
52 onChange = "${pkgs.writeShellScript "doom-change" ''
53 export DOOMDIR="${config.home.sessionVariables.DOOMDIR}"
54 export DOOMLOCALDIR="${config.home.sessionVariables.DOOMLOCALDIR}"
55 if [ ! -d "$DOOMLOCALDIR" ]; then
56 ${config.xdg.configHome}/emacs/bin/doom -y install
58 ${config.xdg.configHome}/emacs/bin/doom -y sync -u
63 xresources.properties = {
64 #"Emacs.FontBackend" = "xft";