mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
users/foo-dogsquared/programs/doom-emacs: refactor
This commit is contained in:
parent
fe0c088ce9
commit
92e409e40f
@ -7,6 +7,8 @@
|
|||||||
let
|
let
|
||||||
userCfg = config.users.foo-dogsquared;
|
userCfg = config.users.foo-dogsquared;
|
||||||
cfg = userCfg.programs.doom-emacs;
|
cfg = userCfg.programs.doom-emacs;
|
||||||
|
|
||||||
|
doomEmacsInstallation = "${config.xdg.configHome}/emacs";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.users.foo-dogsquared.programs.doom-emacs.enable =
|
options.users.foo-dogsquared.programs.doom-emacs.enable =
|
||||||
@ -28,17 +30,17 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Automatically install Doom Emacs from here.
|
# Automatically install Doom Emacs from here.
|
||||||
home.mutableFile."${config.xdg.configHome}/emacs" = {
|
home.mutableFile.${doomEmacsInstallation} = {
|
||||||
url = "https://github.com/doomemacs/doomemacs.git";
|
url = "https://github.com/doomemacs/doomemacs.git";
|
||||||
type = "git";
|
type = "git";
|
||||||
extraArgs = [ "--depth" "1" ];
|
extraArgs = [ "--depth" "1" ];
|
||||||
postScript = ''
|
postScript = ''
|
||||||
${config.xdg.configHome}/emacs/bin/doom install --no-config --no-fonts --install --force
|
${doomEmacsInstallation}/bin/doom install --no-config --no-fonts --install --force
|
||||||
${config.xdg.configHome}/emacs/bin/doom sync
|
${doomEmacsInstallation}/bin/doom sync
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionPath = [ "${config.xdg.configHome}/emacs/bin" ];
|
home.sessionPath = [ "${doomEmacsInstallation}/bin" ];
|
||||||
|
|
||||||
# Doom Emacs dependencies for the usual modules.
|
# Doom Emacs dependencies for the usual modules.
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
Loading…
Reference in New Issue
Block a user