dotfiles/modules/editors/emacs.nix

88 lines
1.8 KiB
Nix
Raw Normal View History

2021-09-10 14:00:56 +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-04-18 12:19:41 +02:00
myEmacs = with pkgs;
2022-04-30 13:09:33 +02:00
((emacsPackagesFor emacsNativeComp).emacsWithPackages
2022-04-18 19:28:03 +02:00
(epkgs: [ epkgs.vterm ]));
2022-03-30 10:55:57 +02:00
cfg = config.modules.editors.emacs;
2022-02-11 22:25:07 +01:00
in {
2022-03-30 10:55:57 +02:00
options.modules.editors = {
emacs = mkOption {
default = true;
type = types.bool;
example = false;
};
};
config = mkIf cfg {
2022-03-23 12:41:04 +01:00
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
2021-10-11 11:17:44 +02:00
2022-03-23 12:41:04 +01:00
home-manager.users.moritz = {
home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ];
services.emacs = {
enable = true;
2022-04-18 12:19:41 +02:00
package = myEmacs;
2022-03-23 12:41:04 +01:00
};
2021-09-09 21:55:28 +02:00
2022-03-23 12:41:04 +01:00
home.packages = with pkgs; [
## Emacs itself
binutils # native-comp needs 'as', provided by this
2022-04-18 12:19:41 +02:00
myEmacs
2021-09-10 14:00:56 +02:00
2022-03-23 12:41:04 +01:00
## Doom dependencies
git
(ripgrep.override { withPCRE2 = true; })
gnutls # for TLS connectivity
2021-09-10 14:00:56 +02:00
2022-03-23 12:41:04 +01: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-03-23 12:41:04 +01:00
## Module dependencies
# :checkers spell
2022-03-30 10:55:57 +02:00
(hunspellWithDicts [
hunspellDicts.en_GB-ize
hunspellDicts.en_US
hunspellDicts.de_DE
])
2022-02-11 22:25:07 +01:00
2022-03-23 12:41:04 +01:00
# :checkers grammar
languagetool
2022-02-11 22:25:07 +01:00
2022-03-23 12:41:04 +01:00
# :tools lookup & :lang org +roam
sqlite
2022-04-18 12:19:41 +02:00
gcc # HACK to get emacsqlite binary
2022-03-23 12:41:04 +01:00
wordnet
graphviz
2022-02-11 22:25:07 +01:00
2022-03-23 12:41:04 +01:00
# :lang latex & :lang org (latex previews)
texlive.combined.scheme-full
texlab
2022-02-11 22:25:07 +01:00
2022-03-23 12:41:04 +01:00
# :lang nix
nixfmt # for formating nix
rnix-lsp
2022-02-11 22:25:07 +01:00
2022-03-23 12:41:04 +01:00
# :lang markdown
pandoc
2022-02-11 22:25:07 +01:00
2022-03-23 12:41:04 +01:00
# :app everywhere
xdotool
xorg.xwininfo
xclip
xorg.xprop
2022-02-11 22:25:07 +01:00
2022-03-23 12:41:04 +01:00
# :lang python
nodePackages.pyright
python-dev
2022-02-15 16:40:23 +01:00
2022-03-23 12:41:04 +01:00
# :email
mu
isync
];
};
2021-09-09 21:55:28 +02:00
};
}