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
tree-sitter-markdown
tree-sitter-markdown-inline
];
custom-emacs = with newpkgs; ((emacsPackagesFor (emacs29-pgtk.override {withNativeCompilation = true;})).emacsWithPackages (epkgs:
with epkgs; [ with epkgs; [
alert # alert
all-the-icons # all-the-icons
all-the-icons-dired # all-the-icons-dired
avy # avy
beacon # beacon
catppuccin-theme # catppuccin-theme
cask-mode # cask-mode
company # company
crux # crux
dimmer # dimmer
dired-du # dired-du
dired-open # dired-open
direnv # direnv
dirvish # dirvish
doom-modeline # doom-modeline
editorconfig # editorconfig
emacs-all-the-icons-fonts # emacs-all-the-icons-fonts
evil # evil
evil-collection # evil-collection
evil-commentary # evil-commentary
evil-goggles # evil-goggles
flycheck # flycheck
flycheck-relint # flycheck-relint
flymake # flymake
form-feed # form-feed
general # general
hl-todo # hl-todo
ligature # ligature
lsp-mode # lsp-mode
lsp-treemacs # lsp-treemacs
lsp-ui # lsp-ui
macrostep # macrostep
magit # magit
markdown-mode # markdown-mode
modus-themes # modus-themes
move-text # move-text
org-cliplink # org-cliplink
org-contacts # org-contacts
org-pomodoro # org-pomodoro
nano-theme # nano-theme
no-littering # no-littering
nov # nov
paredit # paredit
peep-dired # peep-dired
projectile # projectile
rainbow-delimiters # rainbow-delimiters
rainbow-mode # rainbow-mode
relint # relint
ripgrep # ripgrep
smartparens # smartparens
string-inflection # string-inflection
svg-lib # svg-lib
tldr # tldr
toc-org # toc-org
(treesit-grammars.with-grammars tree-sitter-parsers) # treesit-grammars.with-all-grammars
treemacs # treemacs
treemacs-evil # treemacs-evil
treemacs-projectile # treemacs-projectile
treemacs-magit # treemacs-magit
tree-sitter # tree-sitter
undo-tree # undo-tree
use-package # use-package
vertico # vertico
vertico-posframe # vertico-posframe
vterm vterm
vterm-toggle # vterm-toggle
which-key # which-key
whitespace-cleanup-mode # whitespace-cleanup-mode
wakatime-mode # wakatime-mode
ws-butler # 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;