]> Git — Sourcephile - julm/julm-nix.git/blob - homes/softwares/emacs.nix
emacs: customize config
[julm/julm-nix.git] / homes / softwares / emacs.nix
1 { inputs, pkgs, lib, config, ... }:
2 {
3 /*
4 imports = [
5 inputs.nix-doom-emacs.hmModule
6 ];
7 programs.doom-emacs = {
8 enable = config.host.developer;
9 doomPrivateDir =
10 "${config.home.homeDirectory}/.doom.d";
11 };
12 services.emacs = {
13 #enable = true; # Use with emacsclient -c
14 package = config.programs.emacs.package;
15 };
16 */
17 home.sessionPath = [ "${config.xdg.configHome}/emacs/bin" ];
18 home.sessionVariables = {
19 DOOMDIR = "${config.xdg.configHome}/doom-config";
20 DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
21 };
22 xdg.configFile = {
23 #"doom-config/config.el".text = emacs/config.el;
24 #"doom-config/init.el".source = emacs/init.el;
25 "doom-config/packages.el".text = "";
26 "emacs" = {
27 source = inputs.doom-emacs;
28 onChange = "${pkgs.writeShellScript "doom-change" ''
29 export DOOMDIR="${config.home.sessionVariables.DOOMDIR}"
30 export DOOMLOCALDIR="${config.home.sessionVariables.DOOMLOCALDIR}"
31 if [ ! -d "$DOOMLOCALDIR" ]; then
32 ${config.xdg.configHome}/emacs/bin/doom -y install
33 else
34 ${config.xdg.configHome}/emacs/bin/doom -y sync -u
35 fi
36 ''}";
37 };
38 };
39
40 home.packages = with pkgs; [
41 # DOOM Emacs dependencies
42 binutils
43 (ripgrep.override { withPCRE2 = true; })
44 gnutls
45 fd
46 imagemagick
47 zstd
48 #nodePackages.javascript-typescript-langserver
49 sqlite
50 editorconfig-core-c
51 emacs
52 emacs-all-the-icons-fonts
53 ];
54 }