System/home-manager/modules/programs/emacs.nix

79 lines
1.5 KiB
Nix
Raw Normal View History

2025-01-13 19:53:42 +00:00
{emacsPackage ? null}: {
2024-11-29 06:05:35 +00:00
config,
lib,
pkgs,
...
2025-01-13 19:53:42 +00:00
}: let
2024-11-29 06:05:35 +00:00
myAspell = pkgs.aspellWithDicts (d: [
d.en
d.en-science
d.en-computers
]);
2025-01-13 19:53:42 +00:00
emacsPackage' =
if emacsPackage == null
then pkgs.emacs29-pgtk
else emacsPackage;
in {
2024-11-29 06:05:35 +00:00
home.packages = with pkgs; [
# For markdown rendering
python312Packages.grip
# For graph generation
graphviz
sqlite
plantuml
# For latex editing
texlive.combined.scheme-medium
# For notifications
libnotify
# For spelling
myAspell
# For nix
nil
2024-11-29 06:05:35 +00:00
manix
nix-doc
# For email
mu
meson
pkg-config
glib
# Ripgrep for projectile
ripgrep
fd
2024-11-29 06:05:35 +00:00
# Desktop file for org-protocol
(makeDesktopItem {
name = "org-protocol";
exec = "emacsclient %u";
comment = "Org protocol";
desktopName = "org-protocol";
type = "Application";
2025-01-13 19:53:42 +00:00
mimeTypes = ["x-scheme-handler/org-protocol"];
2024-11-29 06:05:35 +00:00
})
# For format output
# wkhtmltopdf
];
programs.emacs = {
enable = true;
package = emacsPackage';
2025-01-13 19:53:42 +00:00
extraPackages = epkgs:
with pkgs; [
epkgs.mu4e
epkgs.vterm
epkgs.pdf-tools
epkgs.emacsql
epkgs.emacsql-sqlite
(tree-sitter.withPlugins (
2025-01-13 19:53:42 +00:00
grammars:
with grammars; [
tree-sitter-nix
tree-sitter-rust
tree-sitter-toml
]
))
];
2024-11-29 06:05:35 +00:00
};
2025-01-09 16:41:29 +00:00
services.emacs = {
enable = true;
client.enable = true;
};
2024-11-29 06:05:35 +00:00
}