emacs.nix: switch to doom

This commit is contained in:
Charlie Root 2024-08-27 16:53:00 +02:00
commit e351683d29

View file

@ -10,113 +10,127 @@
inherit (lib) mkIf; inherit (lib) mkIf;
# Taken from outfoxxed since figuring this out is really annoying. # Taken from outfoxxed since figuring this out is really annoying.
newpkgs = pkgswithemacs =
pkgs.appendOverlays pkgs.appendOverlays
(with inputs.emacs-overlay.overlays; [ (with inputs.emacs-overlay.overlays; [
emacs emacs
package package
]); ]);
tree-sitter-parsers = grammars: custom-emacs = with pkgswithemacs; ((emacsPackagesFor
with grammars; [ (emacs29-pgtk.override {withNativeCompilation = true;}))
tree-sitter-dot .emacsWithPackages (epkgs:
tree-sitter-elisp with epkgs; [
tree-sitter-markdown # alert
tree-sitter-markdown-inline # all-the-icons
]; # all-the-icons-dired
# avy
custom-emacs = with newpkgs; ((emacsPackagesFor (emacs29-pgtk.override {withNativeCompilation = true;})).emacsWithPackages (epkgs: # beacon
with epkgs; [ # catppuccin-theme
alert # cask-mode
all-the-icons # company
all-the-icons-dired # crux
avy # dimmer
beacon # dired-du
catppuccin-theme # dired-open
cask-mode # direnv
company # dirvish
crux # doom-modeline
dimmer # editorconfig
dired-du # emacs-all-the-icons-fonts
dired-open # evil
direnv # evil-collection
dirvish # evil-commentary
doom-modeline # evil-goggles
editorconfig # flycheck
emacs-all-the-icons-fonts # flycheck-relint
evil # flymake
evil-collection # form-feed
evil-commentary # general
evil-goggles # hl-todo
flycheck # ligature
flycheck-relint # lsp-mode
flymake # lsp-treemacs
form-feed # lsp-ui
general # macrostep
hl-todo # magit
ligature # markdown-mode
lsp-mode # modus-themes
lsp-treemacs # move-text
lsp-ui # org-cliplink
macrostep # org-contacts
magit # org-pomodoro
markdown-mode # nano-theme
modus-themes # no-littering
move-text # nov
org-cliplink # paredit
org-contacts # peep-dired
org-pomodoro # projectile
nano-theme # rainbow-delimiters
no-littering # rainbow-mode
nov # relint
paredit # ripgrep
peep-dired # smartparens
projectile # string-inflection
rainbow-delimiters # svg-lib
rainbow-mode # tldr
relint # toc-org
ripgrep # treesit-grammars.with-all-grammars
smartparens # treemacs
string-inflection # treemacs-evil
svg-lib # treemacs-projectile
tldr # treemacs-magit
toc-org # tree-sitter
(treesit-grammars.with-grammars tree-sitter-parsers) # undo-tree
treemacs # use-package
treemacs-evil # vertico
treemacs-projectile # vertico-posframe
treemacs-magit vterm
tree-sitter # vterm-toggle
undo-tree # which-key
use-package # whitespace-cleanup-mode
vertico # wakatime-mode
vertico-posframe # ws-butler
vterm ]));
vterm-toggle
which-key
whitespace-cleanup-mode
wakatime-mode
ws-butler
]));
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.${username} = { home-manager.users.${username} = {
home.packages = with pkgs; [ home.packages = with pkgs; [
# needed my native-comp
binutils
# Emacs itself
custom-emacs custom-emacs
clang-tools
# Doom dependencies
git
ripgrep ripgrep
fd gnutls
imagemagick
ispell ## Optional dependencies
mediainfo fd # faster projectile indexing
findutils imagemagick # for image-dired
graphviz # (mkIf (config.programs.gnupg.agent.enable)
djvulibre # pinentry-emacs) # in-emacs gnupg prompts
hunspell zstd # for undo-fu-session/undo-tree compression
poppler
## Module dependencies
# :checkers spell
(aspellWithDicts (ds: with ds; [de en en-computers en-science]))
# :tools editorconfig
editorconfig-core-c # per-project style config
# :tools lookup & :lang org +roam
sqlite sqlite
unzip # :lang latex & :lang org (latex previews)
texlive.combined.scheme-medium
# :lang beancount
beancount
fava
# :lang nix
age
]; ];
environment.variables.PATH = ["$XDG_CONFIG_HOME/emacs/bin"];
services.emacs = { services.emacs = {
enable = true; enable = true;
package = custom-emacs; package = custom-emacs;