nixos-config/home/emacs.nix
2025-09-05 15:01:18 +02:00

77 lines
1.8 KiB
Nix

# home-manager configuration for Emacs
{lib, pkgs, ...}:
let
emacs-config = builtins.fetchGit {
url = "git@git.nirgendwo.xyz:janis/dot-emacs.git";
ref = "main";
rev = "41f5c3340a0232ea1c0e0bb44b0609b2956c3fe9";
};
emacs = pkgs.emacs-git-pgtk;
in {
# TODO: turn this into a FHS or package so these dependencies don't have to be
# accessible from the global namespace.
home.packages = with pkgs; [
python3
enchant2 # spell checking
enchant2.dev # for building jinx
pkg-config
git
ripgrep # for Emacs' ripgrep integration
libvterm-neovim # vterm support for Emacs
nodejs_24
copilot-node-server
copilot-language-server-fhs
cmake
libtool
gnumake
gcc
texlive.combined.scheme-full
(tree-sitter.withPlugins (grammars: with grammars; [
tree-sitter-bash
tree-sitter-nix
tree-sitter-toml
tree-sitter-elisp
tree-sitter-rust
tree-sitter-cpp
tree-sitter-c
tree-sitter-zig
tree-sitter-elisp
tree-sitter-markdown
# tree-sitter-slang
]))
# spelling
# Note: don't use `hunspellWithDicts` here, because enchant will not be able
# to see the dictionaries unless they are by themselves.
hunspell
# hunspellDicts.en-gb-ise
hunspellDicts.en-gb-large # contains both ise and ize spellings
hunspellDicts.de-de
hunspellDicts.da-dk
# jinx from emacsPackages
emacsPackages.jinx
# language servers
pkgs.unstable.rust-analyzer
nixd];
# xdg.configFile = {
# "emacs" = {
# source = emacs-config;
# };
# };
services.emacs = {
enable = true;
package = emacs;
};
programs.emacs = {
enable = true;
package = emacs;
extraPackages = (epkgs: with epkgs; [
jinx
]);
};
}