-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
54 lines (50 loc) · 1.27 KB
/
default.nix
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
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.emacs;
types = lib.types;
in
{
options.modules.emacs.enable = lib.mkEnableOption "emacs";
config = lib.mkIf cfg.enable {
home = {
activation = {
symlinkDotEmacs = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
dot_emacs="$XDG_CONFIG_HOME/emacs"
if [ ! -e $dot_emacs ]; then
$DRY_RUN_CMD ln -snf $HOME/dotfiles/modules/emacs/emacs.d $dot_emacs
fi
'';
};
packages =
let
emacsWithPackages = (pkgs.emacsPackagesFor pkgs.emacs-git).emacsWithPackages;
# Some packages should come "with Emacs" via nix, as they are either
# notoriously difficult to build locally on NixOS, or not in MELPA etc.
myEmacs = emacsWithPackages (p: [
# (p.treesit-grammars.with-grammars (g: [
# g.tree-sitter-python
# g.tree-sitter-lua
# ]))
p.treesit-grammars.with-all-grammars
p.vterm
]);
in
with pkgs;
[
myEmacs
# Programs needed at runtime or for straight to build packages
cmake
gcc
libtool
meson
ninja
shellcheck
];
};
};
}