-
Notifications
You must be signed in to change notification settings - Fork 12
/
systemCat.nix
203 lines (195 loc) · 6.86 KB
/
systemCat.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
{ config, lib, inputs, ... }: let
utils = inputs.nixCats.utils;
in {
imports = [
inputs.nixCats.nixosModules.default
];
config = {
# this value, nixCats is the defaultPackageName you pass to mkNixosModules
# it will be the namespace for your options.
nixCats = {
# these are some of the options. For the rest see
# :help nixCats.flake.outputs.utils.mkNixosModules
# you do not need to use every option here, anything you do not define
# will be pulled from the flake instead.
enable = true;
nixpkgs_version = inputs.nixpkgs;
# this will add the overlays from ./overlays and also,
# add any plugins in inputs named "plugins-pluginName" to pkgs.neovimPlugins
# It will not apply to overall system, just nixCats.
addOverlays = /* (import ./overlays inputs) ++ */ [
(utils.standardPluginOverlay inputs)
];
packageNames = [ "myNixModuleNvim" ];
luaPath = "${./.}";
# you could also import lua from the flake though,
# which we do for user config after this config for root
# packageDef is your settings and categories for this package.
# categoryDefinitions.replace will replace the whole categoryDefinitions with a new one
categoryDefinitions.replace = ({ pkgs, settings, categories, extra, name, mkNvimPlugin, ... }@packageDef: {
lspsAndRuntimeDeps = {
general = [];
};
startupPlugins = {
general = [];
# themer = with pkgs; [
# # you can even make subcategories based on categories and settings sets!
# (builtins.getAttr packageDef.categories.colorscheme {
# "onedark" = onedark-vim;
# "catppuccin" = catppuccin-nvim;
# "catppuccin-mocha" = catppuccin-nvim;
# "tokyonight" = tokyonight-nvim;
# "tokyonight-day" = tokyonight-nvim;
# }
# )
# ];
};
optionalPlugins = {
general = [];
};
# shared libraries to be added to LD_LIBRARY_PATH
# variable available to nvim runtime
sharedLibraries = {
general = with pkgs; [
# libgit2
];
};
environmentVariables = {
test = {
CATTESTVAR = "It worked!";
};
};
extraWrapperArgs = {
test = [
'' --set CATTESTVAR2 "It worked again!"''
];
};
# lists of the functions you would have passed to
# python.withPackages or lua.withPackages
# get the path to this python environment
# in your lua config via
# vim.g.python3_host_prog
# or run from nvim terminal via :!<packagename>-python3
extraPython3Packages = {
test = (_:[]);
};
# populates $LUA_PATH and $LUA_CPATH
extraLuaPackages = {
test = [ (_:[]) ];
};
});
# see :help nixCats.flake.outputs.packageDefinitions
packageDefinitions.replace = {
# These are the names of your packages
# you can include as many as you wish.
myNixModuleNvim = {pkgs , ... }: {
# they contain a settings set defined above
# see :help nixCats.flake.outputs.settings
settings = {
wrapRc = true;
# IMPORTANT:
# your alias may not conflict with your other packages.
aliases = [ "vim" "systemVim" ];
# neovim-unwrapped = inputs.neovim-nightly-overlay.packages.${pkgs.system}.neovim;
};
# and a set of categories that you want
# (and other information to pass to lua)
categories = {
general = true;
test = true;
example = {
youCan = "add more than just booleans";
toThisSet = [
"and the contents of this categories set"
"will be accessible to your lua with"
"nixCats('path.to.value')"
"see :help nixCats"
];
};
};
};
};
# you can do it per user as well
users.REPLACE_ME = {
enable = true;
packageNames = [ "REPLACE_MEs_VIM" ];
categoryDefinitions.replace = ({ pkgs, settings, categories, extra, name, mkNvimPlugin, ... }@packageDef: {
lspsAndRuntimeDeps = {
general = [];
};
startupPlugins = {
general = [];
# themer = with pkgs; [
# # you can even make subcategories based on categories and settings sets!
# (builtins.getAttr packageDef.categories.colorscheme {
# "onedark" = onedark-vim;
# "catppuccin" = catppuccin-nvim;
# "catppuccin-mocha" = catppuccin-nvim;
# "tokyonight" = tokyonight-nvim;
# "tokyonight-day" = tokyonight-nvim;
# }
# )
# ];
};
optionalPlugins = {
general = [];
};
# shared libraries to be added to LD_LIBRARY_PATH
# variable available to nvim runtime
sharedLibraries = {
general = with pkgs; [
# libgit2
];
};
environmentVariables = {
test = {
CATTESTVAR = "It worked!";
};
};
extraWrapperArgs = {
test = [
'' --set CATTESTVAR2 "It worked again!"''
];
};
# lists of the functions you would have passed to
# python.withPackages or lua.withPackages
# get the path to this python environment
# in your lua config via
# vim.g.python3_host_prog
# or run from nvim terminal via :!<packagename>-python3
extraPython3Packages = {
test = (_:[]);
};
# populates $LUA_PATH and $LUA_CPATH
extraLuaPackages = {
test = [ (_:[]) ];
};
});
packageDefinitions.replace = {
REPLACE_MEs_VIM = {pkgs, ...}: {
settings = {
wrapRc = true;
# IMPORTANT:
# your alias may not conflict with your other packages.
aliases = [ "vim" "systemVim" ];
# neovim-unwrapped = inputs.neovim-nightly-overlay.packages.${pkgs.system}.neovim;
};
categories = {
general = true;
test = true;
example = {
youCan = "add more than just booleans";
toThisSet = [
"and the contents of this categories set"
"will be accessible to your lua with"
"nixCats('path.to.value')"
"see :help nixCats"
];
};
};
};
};
};
};
};
}