Skip to content

Instantly share code, notes, and snippets.

@jespada
Forked from dltacube/linux.nix
Created January 17, 2024 12:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jespada/588cdc3d67de179ee6906c12eb01650e to your computer and use it in GitHub Desktop.
Save jespada/588cdc3d67de179ee6906c12eb01650e 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