2020-08-06 15:35:49 +00:00
|
|
|
# Ah yes, the bane of my endless configuration hell (or heaven, whichever your personal preferences).
|
|
|
|
# Or specifically, Org-mode...
|
|
|
|
# Doom Emacs saved me from being a configuration demon.
|
|
|
|
{ config, options, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
options.modules.editors.emacs = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
};
|
2020-08-16 08:33:44 +00:00
|
|
|
|
|
|
|
# Just make sure the unstable version of Emacs is available as a package by creating an overlay.
|
|
|
|
pkg = mkOption {
|
|
|
|
type = types.package;
|
2020-08-30 15:27:12 +00:00
|
|
|
default = pkgs.unstable.emacs;
|
2020-08-16 08:33:44 +00:00
|
|
|
};
|
2020-08-06 15:35:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.modules.editors.emacs.enable {
|
2020-08-16 08:33:44 +00:00
|
|
|
my.packages = with pkgs; [
|
|
|
|
((emacsPackagesNgGen config.modules.editors.emacs.pkg).emacsWithPackages (epkgs: [
|
|
|
|
epkgs.vterm
|
|
|
|
]))
|
|
|
|
|
2020-08-06 15:35:49 +00:00
|
|
|
# Doom dependencies
|
|
|
|
git
|
|
|
|
(ripgrep.override { withPCRE2 = true; })
|
|
|
|
gnutls
|
|
|
|
|
|
|
|
# Optional depedencies
|
|
|
|
fd # faster projectile
|
|
|
|
imagemagick # image-dired
|
|
|
|
# (lib.mkIf (config.programs.gnupg.agent.enable)
|
|
|
|
# pinentry_emacs) # gnupg-emacs
|
|
|
|
zstd # for undo-fu-sessions
|
|
|
|
|
|
|
|
# Module dependencies
|
|
|
|
## :checkers spell
|
|
|
|
aspell
|
|
|
|
aspellDicts.en
|
|
|
|
aspellDicts.en-computers
|
|
|
|
aspellDicts.en-science
|
|
|
|
|
|
|
|
## :checkers grammar
|
|
|
|
languagetool
|
|
|
|
|
|
|
|
## :tools editorconfig
|
|
|
|
editorconfig-core-c
|
|
|
|
|
|
|
|
## :tools lookup & :lang org+roam
|
|
|
|
sqlite
|
2020-08-16 08:33:44 +00:00
|
|
|
];
|
2020-08-06 15:35:49 +00:00
|
|
|
|
2020-08-16 08:33:44 +00:00
|
|
|
fonts.fonts = with pkgs; [
|
|
|
|
emacs-all-the-icons-fonts
|
|
|
|
];
|
2020-08-06 15:35:49 +00:00
|
|
|
|
|
|
|
# Placing the Doom Emacs config.
|
2020-08-16 08:33:44 +00:00
|
|
|
my.home.xdg.configFile."doom" = {
|
2020-08-06 15:35:49 +00:00
|
|
|
source = ../../config/emacs;
|
|
|
|
recursive = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|