74 lines
1.7 KiB
Nix

{
lib,
pkgs,
config,
...
}:
with lib; let
doomRepoUrl = "https://github.com/doomemacs/doomemacs";
configRepoUrl = "https://gitlab.julian-mutter.de/julian/emacs-config";
in {
home.sessionPath = ["/home/julian/.config/emacs/bin"];
home.packages = with pkgs;
[
binutils # native-comp needs 'as', provided by this
## Doom dependencies
git
(ripgrep.override {withPCRE2 = true;})
## Optional dependencies
fd # faster projectile indexing
imagemagick # for image-dired
zstd # for undo-fu-session/undo-tree compression
## Module dependencies
(aspellWithDicts (
ds:
with ds; [
en
en-computers
en-science
de
]
))
hunspell
hunspellDicts.de_DE
hunspellDicts.en_US
sqlite
# Code formatters for use with doom emacs
nixfmt-rfc-style # nix
alejandra # nix
nixd # nix lsp
dockfmt # docker
google-java-format # java
black # python
rustfmt # rust
shfmt
pyright
clang-tools # c++ lsp etc
ltex-ls # latex languagetool
graphviz
# Lsps for use with doom emacs
# neocmakelsp # cmake
emacs-all-the-icons-fonts
]
++ lib.optional config.is-nixos emacs;
home.activation.installDoomEmacs = lib.hm.dag.entryAfter ["writeBoundary"] ''
if [ ! -d "/home/julian/.config/emacs" ]; then
$DRY_RUN_CMD ${pkgs.git}/bin/git clone --depth=1 --single-branch "${doomRepoUrl}" "/home/julian/.config/emacs"
fi
if [ ! -d "/home/julian/.config/doom" ]; then
$DRY_RUN_CMD ${pkgs.git}/bin/git clone "${configRepoUrl}" "/home/julian/.config/doom"
fi
'';
}