conf: doom-emacs dynamically

This commit is contained in:
lily 2024-07-26 19:16:34 -04:00
parent 041b37d7a7
commit 7a13376d09
Signed by: lily
GPG key ID: 601F3263FBCBC4B9

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, config, lib, ... }:
{
programs.emacs = {
@ -6,8 +6,17 @@
package = pkgs.emacs;
};
# environment.variables = {
# # Point Emacs to the source controlled configuration files.
# EMACSLOADPATH = builtins.getEnv "HOME" + "/.dotfiles/home-manager/packages/doom-emacs";
# };
home.activation = {
cloneDoomEmacs = ''
if [ ! -d "$HOME/.emacs.d" ]; then
${pkgs.git}/bin/git clone https://github.com/doomemacs/doomemacs $HOME/.emacs.d
fi
'';
};
home.file.".doom.d" = {
source = ./doom-emacs/.doom.d;
recursive = true;
onChange = builtins.getEnv "HOME" + "/.emacs.d/bin/doom sync";
};
}