1 { inputs, pkgs, lib, config, ... }:
4 programs.doom-emacs = {
5 enable = lib.mkEnableOption "doom-emacs";
8 config = lib.mkIf config.programs.doom-emacs.enable {
11 inputs.nix-doom-emacs.hmModule
13 programs.doom-emacs = {
16 "${config.home.homeDirectory}/.doom.d";
19 #enable = true; # Use with emacsclient -c
20 package = config.programs.emacs.package;
23 fonts.fontconfig.enable = true;
24 home.packages = with pkgs; [
25 # DOOM Emacs dependencies
27 (ripgrep.override { withPCRE2 = true; })
33 #nodePackages.javascript-typescript-langserver
37 emacs-all-the-icons-fonts
39 home.sessionPath = [ "${config.xdg.configHome}/emacs/bin" ];
40 home.sessionVariables = {
41 DOOMDIR = "${config.xdg.configHome}/doom-config";
42 DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
45 #"doom-config/cli.el".text = "";
46 #"doom-config/config.el".source = emacs/config.el;
47 #"doom-config/init.el".source = emacs/init.el;
48 #"doom-config/packages.el".text = "";
50 source = inputs.doom-emacs;
51 onChange = "${pkgs.writeShellScript "doom-change" ''
52 export DOOMDIR="${config.home.sessionVariables.DOOMDIR}"
53 export DOOMLOCALDIR="${config.home.sessionVariables.DOOMLOCALDIR}"
54 if [ ! -d "$DOOMLOCALDIR" ]; then
55 ${config.xdg.configHome}/emacs/bin/doom -y install
57 ${config.xdg.configHome}/emacs/bin/doom -y sync -u
62 xresources.properties = {
63 # Enable subpixel rendering
64 # https://bbs.archlinux.org/viewtopic.php?pid=1080864#p1080864
65 # https://www.emacswiki.org/emacs/XftGnuEmacs#h5o-17
66 "Xft.antialias" = "rgba";
68 "Xft.hintstyle" = "hintfull";
70 "Emacs.FontBackend" = "xft";
71 "Xft.embolden" = true;