94 lines
2.4 KiB
Text
94 lines
2.4 KiB
Text
|
{
|
||
|
config,
|
||
|
lib,
|
||
|
pkgs,
|
||
|
inputs,
|
||
|
...
|
||
|
}: let
|
||
|
cfg = config.modules.system.programs.editors.emacs;
|
||
|
inherit (config.modules.other.system) username;
|
||
|
inherit (lib) mkIf;
|
||
|
|
||
|
# Taken from outfoxxed since figuring this out is really annoying.
|
||
|
pkgswithemacs =
|
||
|
pkgs.appendOverlays
|
||
|
(with inputs.emacs-overlay.overlays; [
|
||
|
emacs
|
||
|
package
|
||
|
]);
|
||
|
|
||
|
custom-emacs = with pkgswithemacs; ((emacsPackagesFor
|
||
|
(emacs29-pgtk.override {
|
||
|
withNativeCompilation = true;
|
||
|
withSQLite3 = true;
|
||
|
withTreeSitter = true;
|
||
|
withToolkitScrollBars = false;
|
||
|
toolkit = "no";
|
||
|
}))
|
||
|
.emacsWithPackages (epkgs:
|
||
|
with epkgs; [
|
||
|
treesit-grammars.with-all-grammars
|
||
|
vterm
|
||
|
]));
|
||
|
in {
|
||
|
imports = [inputs.nix-doom-emacs-unstraightened.hmModule];
|
||
|
|
||
|
config = mkIf cfg.enable {
|
||
|
home-manager.users.${username} = {
|
||
|
programs.doom-emacs = {
|
||
|
enable = true;
|
||
|
doomDir = ~/.config/doom;
|
||
|
emacs = custom-emacs;
|
||
|
extraBinPackages = with pkgs; [git python3 pinentry-tty];
|
||
|
extraPackages = epkgs:
|
||
|
with epkgs; [
|
||
|
vterm
|
||
|
treesit-grammars.with-all-grammars
|
||
|
eat
|
||
|
eshell-prompt-extras
|
||
|
esh-autosuggest
|
||
|
fish-completion
|
||
|
esh-help
|
||
|
eshell-syntax-highlighting
|
||
|
pinentry
|
||
|
];
|
||
|
provideEmacs = false;
|
||
|
experimentalFetchTree = true;
|
||
|
};
|
||
|
home.packages = with pkgs; [
|
||
|
# needed my native-comp
|
||
|
binutils
|
||
|
# Emacs itself
|
||
|
custom-emacs
|
||
|
|
||
|
# Doom dependencies
|
||
|
git
|
||
|
ripgrep
|
||
|
gnutls
|
||
|
|
||
|
## Optional dependencies
|
||
|
fd # faster projectile indexing
|
||
|
imagemagick # for image-dired
|
||
|
# (mkIf (config.programs.gnupg.agent.enable)
|
||
|
# pinentry-emacs) # in-emacs gnupg prompts
|
||
|
zstd # for undo-fu-session/undo-tree compression
|
||
|
nodePackages.prettier
|
||
|
# Module dependencies
|
||
|
# :checkers spell
|
||
|
(aspellWithDicts (ds: with ds; [de en en-computers en-science]))
|
||
|
# :tools editorconfig
|
||
|
editorconfig-core-c # per-project style config
|
||
|
# :tools lookup & :lang org +roam
|
||
|
sqlite
|
||
|
# :lang latex & :lang org (latex previews)
|
||
|
texlive.combined.scheme-medium
|
||
|
# :lang beancount
|
||
|
# beancount
|
||
|
# fava
|
||
|
# :lang nix
|
||
|
age
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
}
|