nixos-config/home/emacs.nix

44 lines
860 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2022-01-11 16:08:21 +01:00
let
inherit (lib)
mkEnableOption
mkIf
;
in
{
2022-01-11 16:08:21 +01:00
options.my.home.emacs = {
enable = mkEnableOption "Emacs daemon configuration";
};
2022-01-11 16:08:21 +01:00
config = mkIf config.my.home.emacs.enable {
home.sessionPath = [ "${config.xdg.configHome}/emacs/bin" ];
home.sessionVariables = {
EDITOR = "emacsclient -t";
};
2022-01-11 16:08:21 +01:00
home.packages = builtins.attrValues {
inherit (pkgs)
sqlite # needed by org-roam
2022-01-11 16:08:21 +01:00
# 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;
2021-12-19 17:34:59 +01:00
package = pkgs.emacsPgtkGcc;
};
};
}