nixos-config/home/emacs.nix
2025-09-02 23:12:59 +02:00

88 lines
2.2 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";
};
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
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
# language servers
pkgs.unstable.rust-analyzer
nixd];
# xdg.configFile = {
# "emacs" = {
# source = emacs-config;
# };
# };
programs.emacs = {
enable = true;
package = pkgs.emacs-git-pgtk;
extraPackages = (epkgs: with epkgs; [
jinx
]);
# pkgs.nixd
# (treesit-grammars.with-grammars (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
# ]))
# (with pkgs;
# (hunspellWithDicts [
# hunspellDicts.en-gb-ise
# hunspellDicts.en-gb-large
# hunspellDicts.de-de
# hunspellDicts.da-dk
# ]))
# ]);
};
}