fix emacs module activation scripts
This commit is contained in:
@ -79,10 +79,11 @@ in {
|
|||||||
# source = ../../config/doom;
|
# source = ../../config/doom;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
home.activation = (mkMerge [
|
||||||
|
(mkIf cfg.useDoom {
|
||||||
|
|
||||||
# If doom is enabled we want to clone the framework
|
# If doom is enabled we want to clone the framework
|
||||||
# The activation script is being run when home-manager rebuilds
|
# The activation script is being run when home-manager rebuilds
|
||||||
home.activation = mkIf cfg.useDoom {
|
|
||||||
|
|
||||||
# Because we write to the filesystem, this script has to be run after HomeManager's writeBoundary
|
# Because we write to the filesystem, this script has to be run after HomeManager's writeBoundary
|
||||||
installDoomEmacs = hm.dag.entryAfter [ "writeBoundary" ] ''
|
installDoomEmacs = hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
if [ ! -d "${config.home.homeDirectory}/.emacs.d" ]; then
|
if [ ! -d "${config.home.homeDirectory}/.emacs.d" ]; then
|
||||||
@ -97,15 +98,16 @@ in {
|
|||||||
ln -sf ${config.home.homeDirectory}/NixFlake/config/doom ${config.home.homeDirectory}/.config/doom
|
ln -sf ${config.home.homeDirectory}/NixFlake/config/doom ${config.home.homeDirectory}/.config/doom
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
})
|
||||||
|
|
||||||
home.activation = mkIf cfg.autosync {
|
(mkIf cfg.autosync {
|
||||||
|
|
||||||
# TODO: assert that doom is enabled and put node after linkDoomConfig node
|
# TODO: assert that doom is enabled and put node after linkDoomConfig node
|
||||||
# No idea what happens on the first install, don't know if install or sync happens first
|
# No idea what happens on the first install, don't know if install or sync happens first
|
||||||
syncDoomEmacs = hm.dag.entryAfter [ "writeBoundary" ] ''
|
syncDoomEmacs = hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
${home.homeDirectory}/.emacs.d/bin/doom sync
|
${config.home.homeDirectory}/.emacs.d/bin/doom sync
|
||||||
'';
|
'';
|
||||||
};
|
})
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user