Skip to content

Instantly share code, notes, and snippets.

@dltacube
Created December 16, 2023 03:06
Show Gist options
  • Save dltacube/280c82b3426690558341a3ac3a71428d to your computer and use it in GitHub Desktop.
Save dltacube/280c82b3426690558341a3ac3a71428d to your computer and use it in GitHub Desktop.
extract of my home-manager configuration
home = {
sessionPath = [ "${config.xdg.configHome}/emacs/bin" "${config.home.homeDirectory}/.emacs.d/bin" "${pkgs.emacs}/bin" "${pkgs.git}" ];
sessionVariables = {
DOOMDIR = "${config.xdg.configHome}/doom-config";
DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
#DOOMLOCALDIR = "${config.home.homeDirectory}/.emacs.d";
};
};
xdg = {
enable = true;
configFile = {
"doom-config".source = dotfiles/dot-doom.d;
"emacs" = {
source = builtins.fetchGit "https://github.com/hlissner/doom-emacs";
onChange = "${pkgs.writeShellScript "doom-change" ''
export DOOMDIR="${config.home.sessionVariables.DOOMDIR}"
export DOOMLOCALDIR="${config.home.sessionVariables.DOOMLOCALDIR}"
export PATH="$PATH:${pkgs.emacs}/bin"
export PATH="$PATH:${pkgs.git}/bin"
export PATH="$PATH:${pkgs.imagemagick}/bin"
export PATH="$PATH:${pkgs.ripgrep}/bin"
export PATH="$PATH:${pkgs.fd}/bin"
export PATH="$PATH:${pkgs.sqlite}/bin"
if [ ! -d "$DOOMLOCALDIR" ]; then
${config.xdg.configHome}/emacs/bin/doom install --force
else
${config.xdg.configHome}/emacs/bin/doom --force clean
${config.xdg.configHome}/emacs/bin/doom --force sync -u
fi
''}";
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment