-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
111 lines (102 loc) · 3.09 KB
/
flake.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{
description = "Description for the project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
emacs.url = "github:nix-community/emacs-overlay";
wrapper-manager = {
url = "github:Padraic-O-Mhuiris/wrapper-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems =
[ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { config, self', inputs', system, ... }:
let
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ inputs.emacs.overlay ];
};
emacs = pkgs.emacsWithPackagesFromUsePackage {
config = ""; # We don't want to create a default.el file
defaultInitFile = false;
package = pkgs.emacs-unstable.override { withGTK3 = true; };
extraEmacsPackages = epkgs:
with epkgs; [
visual-fill-column
embark
org-roam
org-cliplink
embark-consult
consult
consult-projectile
consult-org-roam
consult-notes
consult-dir
esup
highlight-numbers
marginalia
org-bullets
smartparens
undo-tree
helpful
vertico
ace-window
corfu
orderless
all-the-icons
projectile
doom-modeline
doom-themes
modus-themes
evil
evil-collection
general
magit
nix-mode
no-littering
org
org-contrib
rainbow-delimiters
which-key
ts
persp-mode
bufler
envrc
lsp-mode
rustic
tree-sitter-langs
lsp-ui
flycheck
consult-lsp
ox-hugo
];
};
wrapped-emacs = (inputs.wrapper-manager.lib.build {
inherit pkgs;
modules = [
({ pkgs, ... }: {
wrappers.emacs = {
basePackage = emacs;
pathAdd = with pkgs; [
(ripgrep.override { withPCRE2 = true; })
shellcheck
shfmt
fd
rust-analyzer
(aspellWithDicts
(dicts: with dicts; [ en en-computers en-science ]))
];
};
})
];
});
in { packages.default = wrapped-emacs; };
flake = let pkgs = (inputs.nixpkgs.legacyPackages.x86_64-linux);
in {
inherit (inputs.nixpkgs) lib;
inherit pkgs;
};
};
}