]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/emacs.nix
nix: update nixpkgs
[julm/julm-nix.git] / home-manager / profiles / emacs.nix
1 { inputs, pkgs, lib, config, ... }:
2 {
3 /*
4 imports = [
5 inputs.nix-doom-emacs.hmModule
6 ];
7 programs.doom-emacs = {
8 enable = true;
9 doomPrivateDir =
10 "${config.home.homeDirectory}/.doom.d";
11 };
12 */
13 services.emacs = {
14 enable = true;
15 package = config.programs.emacs.package;
16 client.enable = true;
17 socketActivation.enable = true;
18 };
19 fonts.fontconfig.enable = lib.mkDefault true;
20 home.packages = with pkgs; [
21 # DOOM Emacs dependencies
22 binutils
23 #(ripgrep.override { withPCRE2 = true; })
24 fd
25 gnutls
26 hack-font
27 imagemagick
28 zstd
29 #nodePackages.javascript-typescript-langserver
30 sqlite
31 #editorconfig-core-c
32 emacs
33 emacs-all-the-icons-fonts
34 ];
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";
39 };
40 xdg.configFile = {
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;
45 "emacs" = {
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
52 else
53 ${config.xdg.configHome}/emacs/bin/doom -y sync -u
54 fi
55 ''}";
56 };
57 };
58 xresources.properties = {
59 #"Emacs.FontBackend" = "xft";
60 };
61 }