2022-04-10 11:54:58 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit
|
|
|
|
(lib)
|
2022-01-11 16:08:21 +01:00
|
|
|
mkEnableOption
|
|
|
|
mkIf
|
2022-04-10 11:54:58 +02:00
|
|
|
;
|
|
|
|
in {
|
2022-01-11 16:08:21 +01:00
|
|
|
options.my.home.emacs = {
|
2021-04-19 15:42:27 +02:00
|
|
|
enable = mkEnableOption "Emacs daemon configuration";
|
|
|
|
};
|
|
|
|
|
2022-01-11 16:08:21 +01:00
|
|
|
config = mkIf config.my.home.emacs.enable {
|
2022-04-10 11:54:58 +02:00
|
|
|
home.sessionPath = ["${config.xdg.configHome}/emacs/bin"];
|
2021-09-29 23:42:50 +02:00
|
|
|
home.sessionVariables = {
|
|
|
|
EDITOR = "emacsclient -t";
|
|
|
|
};
|
|
|
|
|
2022-01-11 16:08:21 +01:00
|
|
|
home.packages = builtins.attrValues {
|
2022-04-10 11:54:58 +02:00
|
|
|
inherit
|
|
|
|
(pkgs)
|
2022-01-11 16:08:21 +01:00
|
|
|
sqlite # needed by org-roam
|
2024-12-01 17:58:53 +01:00
|
|
|
|
2022-01-11 16:08:21 +01:00
|
|
|
# fonts used by my config
|
|
|
|
emacs-all-the-icons-fonts
|
|
|
|
iosevka-bin
|
2022-04-10 11:54:58 +02:00
|
|
|
;
|
2022-01-11 16:08:21 +01:00
|
|
|
};
|
2021-04-19 16:07:38 +02:00
|
|
|
# make sure above fonts are discoverable
|
|
|
|
fonts.fontconfig.enable = true;
|
|
|
|
|
2021-04-19 15:42:27 +02:00
|
|
|
services.emacs = {
|
|
|
|
enable = true;
|
|
|
|
# generate emacsclient desktop file
|
|
|
|
client.enable = true;
|
2023-12-05 09:20:54 +01:00
|
|
|
socketActivation.enable = true;
|
2021-04-19 15:42:27 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
programs.emacs = {
|
|
|
|
enable = true;
|
2024-03-04 22:43:28 +01:00
|
|
|
package = pkgs.emacs29-pgtk;
|
2023-11-30 14:08:25 +01:00
|
|
|
extraPackages = epkgs: [epkgs.vterm epkgs.pdf-tools pkgs.lilypond epkgs.mu4e];
|
2021-04-19 15:42:27 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|