conf: doom-emacs dynamically

This commit is contained in:
luxzi 2024-07-26 19:16:34 -04:00
parent 0389a2e88c
commit 483d58b3e5
No known key found for this signature in database
GPG key ID: C90237A70F2FDD53

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";
};
}