nichts/modules/programs/editors/emacs/module.nix

101 lines
2 KiB
Nix
Raw Normal View History

2024-09-01 21:37:24 +02:00
{
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.
2024-09-06 08:38:28 +02:00
newpkgs =
2024-09-01 21:37:24 +02:00
pkgs.appendOverlays
(with inputs.emacs-overlay.overlays; [
emacs
package
]);
2024-09-07 22:00:01 +02:00
custom-emacs = with newpkgs; ((emacsPackagesFor (emacs-pgtk.override {
2024-09-06 08:38:28 +02:00
withNativeCompilation = true;
withTreeSitter = true;
}))
2024-09-01 21:37:24 +02:00
.emacsWithPackages (epkgs:
with epkgs; [
2024-09-06 08:38:28 +02:00
avy
better-jumper
catppuccin-theme
company
2024-09-07 22:00:01 +02:00
corfu
2024-09-06 08:38:28 +02:00
crux
cmake-font-lock
2024-09-07 22:00:01 +02:00
diminish
(trivialBuild {
pname = "on.el";
src = pkgs.fetchFromGitLab {
owner = "ajgrf";
repo = "on.el";
rev = "3cf623e1";
sha256 = "sha256-gtSVCpQwv4Ui9VpW7SXnsXIkfHN/6laMLqHTezDcMZg=";
};
version = "0.1.0";
})
2024-09-06 08:38:28 +02:00
direnv
2024-09-07 22:00:01 +02:00
dirvish
2024-09-06 08:38:28 +02:00
doom-modeline
editorconfig
face-explorer
flycheck
frames-only-mode
fussy
2024-09-07 22:00:01 +02:00
gcmh
2024-09-06 08:38:28 +02:00
groovy-mode
just-mode
kotlin-mode
lsp-mode
lsp-treemacs
lsp-ui
magit
markdown-mode
meow
meow-tree-sitter
2024-09-07 22:00:01 +02:00
mode-line-bell
2024-09-06 08:38:28 +02:00
nasm-mode
nix-mode
reformatter # required by nix mode
2024-09-07 22:00:01 +02:00
2024-09-06 08:38:28 +02:00
projectile
peep-dired
2024-09-07 22:00:01 +02:00
persist-state
2024-09-06 08:38:28 +02:00
rainbow-mode
no-littering
2024-09-07 22:00:01 +02:00
suggest
2024-09-06 08:38:28 +02:00
string-inflection
tldr
2024-09-07 22:00:01 +02:00
treesit-auto
2024-09-04 22:02:17 +02:00
treesit-grammars.with-all-grammars
2024-09-06 08:38:28 +02:00
treemacs
treemacs-projectile
treemacs-magit
undo-tree
use-package
vertico
2024-09-01 21:37:24 +02:00
vterm
2024-09-06 08:38:28 +02:00
which-key
ws-butler
2024-09-07 22:00:01 +02:00
zoom
2024-09-01 21:37:24 +02:00
]));
in {
config = mkIf cfg.enable {
home-manager.users.${username} = {
2024-09-06 08:38:28 +02:00
home.packages = [custom-emacs];
2024-09-01 21:37:24 +02:00
2024-09-06 08:38:28 +02:00
services.emacs = {
enable = true;
package = custom-emacs;
};
2024-09-01 21:37:24 +02:00
};
};
}