NixOS/modules/emacs.nix

25 lines
766 B
Nix

{ config, lib, pkgs, ... }: {
options.my.emacs.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.emacs.enable {
users.users.jawz.packages = with pkgs; ([
fd # modern find, faster searches
(ripgrep.override { withPCRE2 = true; }) # modern grep
]);
services.emacs = {
enable = true;
package = with pkgs;
((emacsPackagesFor emacs-gtk).emacsWithPackages
(epkgs: with epkgs; ([ vterm ])));
defaultEditor = true;
};
home-manager.users.jawz.programs.bash.initExtra = ''
emacs-sqlite-fix () {
nix-shell -p cmake sqlite --command "doom sync &&
sc restart emacs &&
emacsclient -e '(org-roam-db-sync)'" &&
doom sync
}
'';
};
}