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-05-19 22:35:54 +02:00
|
|
|
|
2024-08-20 16:43:24 +02:00
|
|
|
# Taken from outfoxxed since figuring this out is really annoying.
|
2024-07-18 18:07:07 +02:00
|
|
|
newpkgs =
|
|
|
|
pkgs.appendOverlays
|
|
|
|
(with inputs.emacs-overlay.overlays; [
|
|
|
|
emacs
|
|
|
|
package
|
|
|
|
]);
|
2024-05-19 22:35:54 +02:00
|
|
|
|
2024-07-18 18:07:07 +02:00
|
|
|
tree-sitter-parsers = grammars:
|
|
|
|
with grammars; [
|
|
|
|
tree-sitter-dot
|
|
|
|
tree-sitter-elisp
|
|
|
|
tree-sitter-markdown
|
|
|
|
tree-sitter-markdown-inline
|
2024-05-19 22:35:54 +02:00
|
|
|
];
|
|
|
|
|
2024-07-18 18:07:07 +02:00
|
|
|
custom-emacs = with newpkgs; ((emacsPackagesFor (emacs29-pgtk.override {withNativeCompilation = true;})).emacsWithPackages (epkgs:
|
2024-08-20 16:43:24 +02:00
|
|
|
with epkgs; [
|
2024-07-19 22:54:10 +02:00
|
|
|
alert
|
2024-07-18 18:07:07 +02:00
|
|
|
all-the-icons
|
|
|
|
all-the-icons-dired
|
|
|
|
avy
|
|
|
|
beacon
|
2024-07-19 22:54:10 +02:00
|
|
|
catppuccin-theme
|
2024-08-20 16:43:24 +02:00
|
|
|
cask-mode
|
2024-07-18 18:07:07 +02:00
|
|
|
company
|
|
|
|
crux
|
2024-07-18 18:07:25 +02:00
|
|
|
dimmer
|
|
|
|
dired-du
|
2024-07-19 22:54:10 +02:00
|
|
|
dired-open
|
2024-07-18 18:07:07 +02:00
|
|
|
direnv
|
2024-08-20 16:43:24 +02:00
|
|
|
dirvish
|
2024-07-18 18:07:07 +02:00
|
|
|
doom-modeline
|
|
|
|
editorconfig
|
2024-07-21 20:14:19 +02:00
|
|
|
emacs-all-the-icons-fonts
|
2024-07-18 18:07:07 +02:00
|
|
|
evil
|
|
|
|
evil-collection
|
2024-08-20 16:43:24 +02:00
|
|
|
evil-commentary
|
2024-07-18 18:07:07 +02:00
|
|
|
evil-goggles
|
|
|
|
flycheck
|
2024-08-20 16:43:24 +02:00
|
|
|
flycheck-relint
|
|
|
|
flymake
|
2024-07-18 18:07:25 +02:00
|
|
|
form-feed
|
2024-07-18 18:07:07 +02:00
|
|
|
general
|
2024-07-18 18:07:25 +02:00
|
|
|
hl-todo
|
|
|
|
ligature
|
2024-07-18 18:07:07 +02:00
|
|
|
lsp-mode
|
|
|
|
lsp-treemacs
|
|
|
|
lsp-ui
|
2024-08-20 16:43:24 +02:00
|
|
|
macrostep
|
2024-07-18 18:07:07 +02:00
|
|
|
magit
|
|
|
|
markdown-mode
|
2024-08-20 16:43:24 +02:00
|
|
|
modus-themes
|
|
|
|
move-text
|
|
|
|
org-cliplink
|
|
|
|
org-contacts
|
|
|
|
org-pomodoro
|
|
|
|
nano-theme
|
2024-07-19 22:54:10 +02:00
|
|
|
no-littering
|
2024-08-20 16:43:24 +02:00
|
|
|
nov
|
|
|
|
paredit
|
2024-07-18 18:07:25 +02:00
|
|
|
peep-dired
|
2024-07-18 18:07:07 +02:00
|
|
|
projectile
|
2024-07-18 18:07:25 +02:00
|
|
|
rainbow-delimiters
|
2024-07-18 18:07:07 +02:00
|
|
|
rainbow-mode
|
2024-08-20 16:43:24 +02:00
|
|
|
relint
|
|
|
|
ripgrep
|
2024-07-19 22:54:10 +02:00
|
|
|
smartparens
|
2024-07-18 18:07:07 +02:00
|
|
|
string-inflection
|
2024-08-20 16:43:24 +02:00
|
|
|
svg-lib
|
2024-07-18 18:07:25 +02:00
|
|
|
tldr
|
2024-07-18 18:07:07 +02:00
|
|
|
toc-org
|
2024-08-20 16:43:24 +02:00
|
|
|
(treesit-grammars.with-grammars tree-sitter-parsers)
|
2024-07-18 18:07:07 +02:00
|
|
|
treemacs
|
|
|
|
treemacs-evil
|
|
|
|
treemacs-projectile
|
|
|
|
treemacs-magit
|
2024-08-20 16:43:24 +02:00
|
|
|
tree-sitter
|
2024-07-18 18:07:07 +02:00
|
|
|
undo-tree
|
|
|
|
use-package
|
|
|
|
vertico
|
2024-08-20 16:43:24 +02:00
|
|
|
vertico-posframe
|
2024-07-18 18:07:25 +02:00
|
|
|
vterm
|
|
|
|
vterm-toggle
|
2024-07-18 18:07:07 +02:00
|
|
|
which-key
|
2024-08-20 16:43:24 +02:00
|
|
|
whitespace-cleanup-mode
|
2024-07-18 18:07:07 +02:00
|
|
|
wakatime-mode
|
|
|
|
ws-butler
|
|
|
|
]));
|
|
|
|
in {
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home-manager.users.${username} = {
|
2024-07-20 12:08:25 +02:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
custom-emacs
|
|
|
|
clang-tools
|
|
|
|
ripgrep
|
|
|
|
fd
|
2024-08-20 16:43:24 +02:00
|
|
|
imagemagick
|
2024-07-20 12:08:25 +02:00
|
|
|
ispell
|
2024-08-20 16:43:24 +02:00
|
|
|
mediainfo
|
2024-07-20 12:08:25 +02:00
|
|
|
findutils
|
|
|
|
graphviz
|
|
|
|
djvulibre
|
2024-07-21 13:18:00 +02:00
|
|
|
hunspell
|
2024-08-20 16:43:24 +02:00
|
|
|
poppler
|
2024-07-20 12:08:25 +02:00
|
|
|
sqlite
|
2024-08-20 16:43:24 +02:00
|
|
|
unzip
|
2024-07-20 12:08:25 +02:00
|
|
|
];
|
2024-07-18 18:07:07 +02:00
|
|
|
services.emacs = {
|
|
|
|
enable = true;
|
|
|
|
package = custom-emacs;
|
|
|
|
};
|
2024-05-19 22:35:54 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|