boxen/home/profiles/emacs/default.nix

61 lines
1.4 KiB
Nix
Raw Normal View History

{ config, pkgs, lib, ... }:
let
shellAliases = {
e = "emacsclient -t"; # Terminal
ew = "emacsclient -c"; # New window (and wait)
en = "emacsclient -nc"; # New window (and return immediately)
calc = "emacs -f full-calc -nw -q"; # Quick fullscreen calculator
doom = "~/.emacs.d/bin/doom";
};
in {
programs.emacs = {
enable = true;
2022-07-06 13:36:43 +00:00
package = pkgs.emacsNativeComp;
};
home.packages = with pkgs;
let py = python3Packages;
in [
editorconfig-core-c
2021-08-05 13:02:09 +00:00
cask
mypy
2021-09-22 12:36:49 +00:00
pyright
2021-08-05 13:02:09 +00:00
haskell-language-server
rust-analyzer
texlab
(pkgs.makeDesktopItem {
name = "org-protocol";
desktopName = "Emacs org-protocol handler";
exec = "emacsclient %u";
2022-03-12 18:38:57 +00:00
terminal = false;
categories = [ "System" ];
mimeTypes = [ "x-scheme-handler/org-protocol" ];
})
];
home.file = {
".doom.d" = {
2021-07-25 19:23:05 +00:00
source = ./doom.d;
recursive = true;
};
2021-07-25 19:23:05 +00:00
".doom.d/snippets".source = ./snippets;
2021-12-23 16:56:33 +00:00
".doom.d/nix.el".text = ''
(add-to-list 'load-path "${pkgs.mu}/share/emacs/site-lisp/mu4e")
'';
};
2020-11-17 17:24:51 +00:00
programs.firefox.profiles.default.settings = {
"network.protocol-handler.expose.org-protocol" = false;
2020-11-17 17:24:51 +00:00
};
programs.zsh = { inherit shellAliases; };
programs.xonsh = { inherit shellAliases; };
services.gpg-agent.extraConfig = ''
2020-11-21 15:51:37 +00:00
allow-emacs-pinentry
'';
}