profiles/editors: automate Doom Emacs installation

This commit is contained in:
Gabriel Arazas 2023-09-18 14:42:29 +08:00
parent eaa16e5c7b
commit 5cbd36bcf0
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 11 additions and 19 deletions

View File

@ -54,6 +54,17 @@ in {
]; ];
}; };
# Automatically install Doom Emacs from here.
home.mutableFile."${config.xdg.configHome}/emacs" = {
url = "https://github.com/doomemacs/doomemacs.git";
type = "git";
extraArgs = [ "--depth" "1" ];
postScript = ''
${config.xdg.configHome}/emacs/bin/doom install --no-config --no-fonts --install --force
${config.xdg.configHome}/emacs/bin/doom sync
'';
};
# Doom Emacs dependencies. # Doom Emacs dependencies.
home.packages = with pkgs; [ home.packages = with pkgs; [
# This is installed just to get Geiser to properly work. # This is installed just to get Geiser to properly work.

View File

@ -144,13 +144,6 @@ in
type = "git"; type = "git";
}; };
# ...Doom Emacs,...
"${config.xdg.configHome}/emacs" = {
url = "https://github.com/doomemacs/doomemacs.git";
type = "git";
extraArgs = [ "--depth" "1" ];
};
# ...my gopass secrets,... # ...my gopass secrets,...
".local/share/gopass/stores/personal" = { ".local/share/gopass/stores/personal" = {
url = "gitea@code.foodogsquared.one:foodogsquared/gopass-secrets-personal.git"; url = "gitea@code.foodogsquared.one:foodogsquared/gopass-secrets-personal.git";
@ -163,16 +156,4 @@ in
type = "git"; type = "git";
}; };
}; };
systemd.user.services.fetch-mutable-files = {
Service.ExecStartPost =
let
script = pkgs.writeShellScript "post-fetch-mutable-files" ''
# Automate installation of Doom Emacs.
${config.xdg.configHome}/emacs/bin/doom install --no-config --no-fonts --install --force
${config.xdg.configHome}/emacs/bin/doom sync
'';
in
builtins.toString script;
};
} }