blob: bc739772aa645898b25a9035454b0b5243265a04 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
{ pkgs, inputs, ...}:
let
outside-emacs = with pkgs; [
(python3.withPackages (p: (with p; [
python-lsp-server
python-lsp-ruff
pylsp-mypy
])))
nil
parallel
ripgrep
emacs-lsp-booster
];
org-tangle-elisp-blocks = (pkgs.callPackage ./org.nix {inherit pkgs; inherit (inputs) from-elisp;}).org-tangle ({ language, flags } :
let is-elisp = (language == "emacs-lisp") || (language == "elisp");
is-tangle = if flags ? ":tangle" then
flags.":tangle" == "yes" || flags.":tangle" == "y" else false;
in is-elisp && is-tangle
);
config-el = pkgs.writeText "config.el" (org-tangle-elisp-blocks (builtins.readFile ./README.org));
emacs = pkgs.emacsWithPackagesFromUsePackage {
package = pkgs.emacs.override {
withGTK3 = true;
withNativeCompilation = true;
withAlsaLib = true;
withSystemd = true;
withToolkitScrollBars = true;
};
override = epkgs: epkgs // {
eglot-booster = pkgs.callPackage ./eglot-booster.nix {
inherit (pkgs) fetchFromGitHub;
inherit (epkgs) trivialBuild;
};
};
config = config-el;
alwaysEnsure = true;
defaultInitFile = true;
extraEmacsPackages = epkgs: with epkgs; [
(treesit-grammars.with-grammars (g: with g; [
tree-sitter-rust
tree-sitter-python
]))
] ++ outside-emacs;
};
in
{
config = {
nixpkgs.overlays = [ inputs.emacs-overlay.overlays.default ];
environment.systemPackages = [
emacs
(pkgs.aspellWithDicts (dicts: with dicts; [ pt_BR en en-computers ]))
] ++ outside-emacs;
fonts.packages = with pkgs; [
emacs-all-the-icons-fonts
(nerdfonts.override { fonts = ["Iosevka"]; })
];
};
}
|