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
|
2022-04-10 11:54:58 +02:00
|
|
|
|
2022-01-11 16:08:21 +01:00
|
|
|
# fonts used by my config
|
2022-04-10 11:54:58 +02:00
|
|
|
|
2022-01-11 16:08:21 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.emacs = {
|
|
|
|
enable = true;
|
2022-04-26 10:46:56 +02:00
|
|
|
package = pkgs.emacsPgtkNativeComp;
|
2022-05-03 16:09:46 +02:00
|
|
|
extraPackages = epkgs: [epkgs.vterm epkgs.pdf-tools];
|
2021-04-19 15:42:27 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|