nixos-config/home/emacs.nix
Antoine Martin f54d1ce5b2 emacs: use standard nixpkgs build
Now that native comp is stable I don't need the overlay, which triggered
a full emacs build almost everytime I bumped it.
2022-05-15 21:35:38 +02:00

50 lines
961 B
Nix

{
config,
lib,
pkgs,
...
}: let
inherit
(lib)
mkEnableOption
mkIf
;
in {
options.my.home.emacs = {
enable = mkEnableOption "Emacs daemon configuration";
};
config = mkIf config.my.home.emacs.enable {
home.sessionPath = ["${config.xdg.configHome}/emacs/bin"];
home.sessionVariables = {
EDITOR = "emacsclient -t";
};
home.packages = builtins.attrValues {
inherit
(pkgs)
sqlite # needed by org-roam
# fonts used by my config
emacs-all-the-icons-fonts
iosevka-bin
;
};
# make sure above fonts are discoverable
fonts.fontconfig.enable = true;
services.emacs = {
enable = true;
# generate emacsclient desktop file
client.enable = true;
};
programs.emacs = {
enable = true;
package = pkgs.emacsNativeComp;
extraPackages = epkgs: [epkgs.vterm epkgs.pdf-tools];
};
};
}