nichts/modules/programs/editors/emacs.nix

140 lines
3.2 KiB
Nix
Raw Normal View History

2024-05-22 14:29:45 +02:00
{
config,
lib,
pkgs,
inputs,
...
2024-07-18 18:07:07 +02:00
}: let
2024-07-20 13:18:01 +02:00
cfg = config.modules.system.programs.editors.emacs;
2024-07-16 11:13:12 +02:00
inherit (config.modules.other.system) username;
2024-07-20 13:18:01 +02:00
inherit (lib) mkIf;
2024-08-20 16:43:24 +02:00
# Taken from outfoxxed since figuring this out is really annoying.
2024-08-27 16:53:00 +02:00
pkgswithemacs =
2024-07-18 18:07:07 +02:00
pkgs.appendOverlays
(with inputs.emacs-overlay.overlays; [
emacs
package
]);
2024-08-27 16:53:00 +02:00
custom-emacs = with pkgswithemacs; ((emacsPackagesFor
(emacs29-pgtk.override {withNativeCompilation = true;}))
.emacsWithPackages (epkgs:
with epkgs; [
# alert
# all-the-icons
# all-the-icons-dired
# avy
# beacon
# catppuccin-theme
# cask-mode
# company
# crux
# dimmer
# dired-du
# dired-open
# direnv
# dirvish
# doom-modeline
# editorconfig
# emacs-all-the-icons-fonts
# evil
# evil-collection
# evil-commentary
# evil-goggles
# flycheck
# flycheck-relint
# flymake
# form-feed
# general
# hl-todo
# ligature
# lsp-mode
# lsp-treemacs
# lsp-ui
# macrostep
# magit
# markdown-mode
# modus-themes
# move-text
# org-cliplink
2024-08-27 17:54:52 +02:00
org-contacts
2024-08-27 16:53:00 +02:00
# org-pomodoro
# nano-theme
# no-littering
# nov
# paredit
# peep-dired
# projectile
# rainbow-delimiters
# rainbow-mode
# relint
# ripgrep
# smartparens
# string-inflection
# svg-lib
# tldr
# toc-org
# treesit-grammars.with-all-grammars
# treemacs
# treemacs-evil
# treemacs-projectile
# treemacs-magit
# tree-sitter
# undo-tree
# use-package
# vertico
# vertico-posframe
vterm
# vterm-toggle
# which-key
# whitespace-cleanup-mode
# wakatime-mode
# ws-butler
]));
2024-07-18 18:07:07 +02:00
in {
config = mkIf cfg.enable {
2024-08-27 16:58:54 +02:00
environment.variables.PATH = ["$XDG_CONFIG_HOME/emacs/bin"];
2024-07-18 18:07:07 +02:00
home-manager.users.${username} = {
2024-07-20 12:08:25 +02:00
home.packages = with pkgs; [
2024-08-27 16:53:00 +02:00
# needed my native-comp
binutils
# Emacs itself
2024-07-20 12:08:25 +02:00
custom-emacs
2024-08-27 16:53:00 +02:00
# Doom dependencies
git
2024-07-20 12:08:25 +02:00
ripgrep
2024-08-27 16:53:00 +02:00
gnutls
## Optional dependencies
fd # faster projectile indexing
imagemagick # for image-dired
# (mkIf (config.programs.gnupg.agent.enable)
# pinentry-emacs) # in-emacs gnupg prompts
zstd # for undo-fu-session/undo-tree compression
2024-08-27 16:58:54 +02:00
# Module dependencies
2024-08-27 16:53:00 +02:00
# :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
2024-07-20 12:08:25 +02:00
sqlite
2024-08-27 16:53:00 +02:00
# :lang latex & :lang org (latex previews)
2024-08-27 16:58:54 +02:00
# texlive.combined.scheme-medium
2024-08-27 16:53:00 +02:00
# :lang beancount
2024-08-27 16:58:54 +02:00
# beancount
# fava
2024-08-27 16:53:00 +02:00
# :lang nix
age
2024-07-20 12:08:25 +02:00
];
2024-08-27 16:53:00 +02:00
2024-07-18 18:07:07 +02:00
services.emacs = {
enable = true;
package = custom-emacs;
};
};
};
}