dotfiles/modules/programs/emacs.nix

95 lines
1.8 KiB
Nix
Raw Normal View History

2022-07-15 13:11:54 +02:00
{ config
, lib
, pkgs
, inputs
, ...
}:
2021-09-09 21:55:28 +02:00
2022-03-30 10:55:57 +02:00
with lib;
2021-09-09 21:55:28 +02:00
let
2022-07-15 13:11:54 +02:00
cfg = config.my.programs.emacs;
2022-10-09 20:52:48 +02:00
myEmacs = with pkgs; ((emacsPackagesFor emacs).emacsWithPackages
2022-07-15 13:11:54 +02:00
(epkgs: [ epkgs.vterm ]));
in
{
2022-10-15 20:00:09 +02:00
options.my.programs.emacs.enable = mkEnableOption "emacs";
2022-07-15 13:11:54 +02:00
config = mkIf cfg.enable {
my.shell.aliases = {
emacs = "emacsclient -t -a 'emacs -t'";
};
2022-03-23 12:41:04 +01:00
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
2022-10-06 20:32:21 +02:00
environment.systemPackages = with pkgs; [
### Emacs itself
binutils # native-comp needs 'as', provided by this
myEmacs
2021-10-11 11:17:44 +02:00
2022-10-06 20:32:21 +02:00
### Doom dependencies
git
(ripgrep.override { withPCRE2 = true; })
gnutls # for TLS connectivity
2021-09-10 14:00:56 +02:00
2022-10-06 20:32:21 +02:00
### Optional dependencies
fd # faster projectile indexing
imagemagick # for image-dired
zstd # for undo-fu-session/undo-tree compression
2021-09-10 14:00:56 +02:00
2022-10-06 20:32:21 +02:00
### Module dependencies
## :checkers
# spell
(hunspellWithDicts [
hunspellDicts.en_GB-ize
hunspellDicts.en_US
hunspellDicts.de_DE
])
2021-09-10 14:00:56 +02:00
2022-10-06 20:32:21 +02:00
# grammar
languagetool
2022-02-11 22:25:07 +01:00
2022-10-06 20:32:21 +02:00
## : tools
# lookup & org +roam
sqlite
gcc # HACK to get emacsqlite binary
wordnet
graphviz
2022-02-11 22:25:07 +01:00
2022-10-06 20:32:21 +02:00
## :lang
# latex & org (latex previews)
2022-11-26 11:37:59 +01:00
texlive.combined.scheme-full
2022-10-06 20:32:21 +02:00
texlab
2022-02-11 22:25:07 +01:00
2022-10-06 20:32:21 +02:00
# nix
nixfmt # for formating nix
rnix-lsp
2022-02-11 22:25:07 +01:00
2022-10-06 20:32:21 +02:00
# markdown & org +pandoc
pandoc
2022-02-11 22:25:07 +01:00
2022-10-06 20:32:21 +02:00
# python
nodePackages.pyright
2022-02-11 22:25:07 +01:00
2022-10-06 20:32:21 +02:00
# sh
nodePackages.bash-language-server
2022-02-15 16:40:23 +01:00
2022-10-06 20:32:21 +02:00
## :email
# mu4e
mu
isync
2022-06-28 19:34:46 +02:00
2022-10-06 20:32:21 +02:00
## :app
# everywhere
xdotool
xorg.xwininfo
xclip
xorg.xprop
];
home-manager.users.moritz = {
home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ];
services.emacs = {
enable = true;
package = myEmacs;
};
2022-03-23 12:41:04 +01:00
};
2021-09-09 21:55:28 +02:00
};
}