Home Gen10 @ 2025-10-20-12:41 by admin-jroeger@T14-OE130-7-ubuntu
This commit is contained in:
parent
f74c0a4c8d
commit
72bd0887b4
@ -85,9 +85,21 @@
|
|||||||
${config.xdg.configHome}/doom-emacs/bin/doom "$@"
|
${config.xdg.configHome}/doom-emacs/bin/doom "$@"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
doom-open = pkgs.writeShellScriptBin "doom-open" ''
|
||||||
|
if [ -t 0]; then
|
||||||
|
exec ${wrapped-emacs}/bin/emacsclient -t "$@"
|
||||||
|
else
|
||||||
|
exec ${wrapped-emacs}/bin/emacsclient -c "$@"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
options.hive.doom = {
|
options.hive.doom = {
|
||||||
enable = lib.mkEnableOption "Enable Doom Emacs";
|
enable = lib.mkEnableOption "Enable Doom Emacs";
|
||||||
|
asDefaultEditor = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "set the EDITOR variable to use the current emacs server (graphical/non-graphical)";
|
||||||
|
};
|
||||||
enableCopilot = lib.mkEnableOption "Enable Copilot in Doom Emacs";
|
enableCopilot = lib.mkEnableOption "Enable Copilot in Doom Emacs";
|
||||||
enableTidal = lib.mkEnableOption "Enable TidalCycles";
|
enableTidal = lib.mkEnableOption "Enable TidalCycles";
|
||||||
withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path";
|
withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path";
|
||||||
@ -146,10 +158,14 @@ in {
|
|||||||
|
|
||||||
home = {
|
home = {
|
||||||
sessionPath = ["${config.xdg.configHome}/doom-emacs/bin"];
|
sessionPath = ["${config.xdg.configHome}/doom-emacs/bin"];
|
||||||
sessionVariables = {
|
sessionVariables =
|
||||||
DOOMDIR = "${config.xdg.configHome}/doom-config";
|
{
|
||||||
DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
|
DOOMDIR = "${config.xdg.configHome}/doom-config";
|
||||||
};
|
DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
|
||||||
|
}
|
||||||
|
// lib.optionalAttrs cfg.asDefaultEditor {
|
||||||
|
EDITOR = "${doom-open}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services.doom-emacs-server = {
|
systemd.user.services.doom-emacs-server = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user