-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevelopment.nix
More file actions
320 lines (312 loc) · 11.3 KB
/
development.nix
File metadata and controls
320 lines (312 loc) · 11.3 KB
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
{
config,
lib,
llm-profile,
pkgs,
...
}: let
inherit (lib) mkIf mkOption;
cfg = config.rc.development;
in {
options = {
rc.development = {
ai = {
enable = lib.mkEnableOption "tools using LLMs";
};
containers = {
enable = lib.mkEnableOption "container-related tooling";
};
javascript = {
enable = lib.mkEnableOption "JavaScript development tooling";
};
};
};
config = lib.mkMerge [
(mkIf cfg.ai.enable {
programs.claude-code = {
enable = true;
memory.source = "${llm-profile}/README.md";
mcpServers = {
glyph = {
type = "http";
url = "http://glyph:8090/mcp";
};
};
settings = {
model = "sonnet";
# Disabled in favor of Basic Memory MCP for cross-device access
autoMemoryEnabled = false;
permissions = {
allow = [
# Nix store (read-only access for inspecting derivations and build outputs)
"Read(/nix/store/*)"
# File exploration
"Bash(cat *)"
"Bash(cut *)"
"Bash(diff *)"
"Bash(du *)"
"Bash(echo *)"
"Bash(file *)"
"Bash(find * -name *)"
"Bash(find * -type *)"
"Bash(find * -path *)"
"Bash(grep *)"
"Bash(head *)"
"Bash(jq *)"
"Bash(ls *)"
"Bash(readlink *)"
"Bash(realpath *)"
"Bash(rg *)"
"Bash(sort *)"
"Bash(tail *)"
"Bash(tr *)"
"Bash(uniq *)"
"Bash(wc *)"
"Bash(which *)"
# Environment
"Bash(env)"
"Bash(hostname)"
"Bash(printenv *)"
"Bash(pwd)"
"Bash(whoami)"
# Networking
"Bash(dig *)"
"Bash(nslookup *)"
"Bash(ping -c *)"
# Nix
"Bash(nix build *)"
"Bash(nix develop *)"
"Bash(nix eval *)"
"Bash(nix flake *)"
"Bash(nix fmt *)"
"Bash(nix log *)"
"Bash(nix path-info *)"
"Bash(nix profile list*)"
"Bash(nix registry list*)"
"Bash(nix search *)"
"Bash(nix show-derivation *)"
"Bash(nix store *)"
"Bash(nix why-depends *)"
"Bash(nix-flake *)"
# Git
"Bash(git add *)"
"Bash(git blame *)"
"Bash(git branch *)"
"Bash(git diff *)"
"Bash(git log *)"
"Bash(git remote -v*)"
"Bash(git remote show *)"
"Bash(git show *)"
"Bash(git stash list*)"
"Bash(git status)"
"Bash(git tag -l *)"
"Bash(git tag --list *)"
# GitHub CLI
"Bash(gh api:*)"
"Bash(gh issue list*)"
"Bash(gh issue status*)"
"Bash(gh issue view*)"
"Bash(gh pr checks*)"
"Bash(gh pr diff*)"
"Bash(gh pr list*)"
"Bash(gh pr status*)"
"Bash(gh pr view*)"
"Bash(gh release list*)"
"Bash(gh release view*)"
"Bash(gh repo view*)"
"Bash(gh run list*)"
"Bash(gh run view*)"
"Bash(gh search:*)"
# Graphite: info
"Bash(gt log*)"
"Bash(gt l*)"
"Bash(gt ls*)"
"Bash(gt status*)"
"Bash(gt info*)"
"Bash(gt children*)"
"Bash(gt parent*)"
# Graphite: navigation
"Bash(gt checkout *)"
"Bash(gt co *)"
"Bash(gt up*)"
"Bash(gt u)"
"Bash(gt u *)"
"Bash(gt down*)"
"Bash(gt d)"
"Bash(gt d *)"
"Bash(gt top*)"
"Bash(gt t)"
"Bash(gt t *)"
"Bash(gt bottom*)"
"Bash(gt b)"
"Bash(gt b *)"
"Bash(gt trunk*)"
# Graphite: workflow
"Bash(gt create *)"
"Bash(gt c *)"
"Bash(gt modify *)"
"Bash(gt m *)"
"Bash(gt submit*)"
"Bash(gt s)"
"Bash(gt s *)"
"Bash(gt ss*)"
"Bash(gt restack*)"
"Bash(gt sync*)"
# System
"Bash(journalctl *)"
"Bash(mkdir *)"
"Bash(systemctl cat *)"
"Bash(systemctl is-active *)"
"Bash(systemctl is-enabled *)"
"Bash(systemctl is-failed *)"
"Bash(systemctl list-jobs*)"
"Bash(systemctl list-sockets*)"
"Bash(systemctl list-timers*)"
"Bash(systemctl list-unit-files*)"
"Bash(systemctl list-units*)"
"Bash(systemctl show *)"
"Bash(systemctl status *)"
"WebFetch(domain:raw.githubusercontent.com)"
"WebFetch(domain:github.com)"
"WebSearch"
"mcp__linear__get_project"
"mcp__linear__list_issues"
"mcp__linear__get_issue"
"mcp__linear__list_comments"
"mcp__linear__extract_images"
"mcp__linear__get_document"
"mcp__figma__get_design_context"
"mcp__figma__get_metadata"
"mcp__figma__get_screenshot"
# MCP: basic-memory
"mcp__glyph__basic-memory__build_context"
"mcp__glyph__basic-memory__canvas"
"mcp__glyph__basic-memory__create_memory_project"
"mcp__glyph__basic-memory__delete_note"
"mcp__glyph__basic-memory__delete_project"
"mcp__glyph__basic-memory__edit_note"
"mcp__glyph__basic-memory__fetch"
"mcp__glyph__basic-memory__list_directory"
"mcp__glyph__basic-memory__list_memory_projects"
"mcp__glyph__basic-memory__move_note"
"mcp__glyph__basic-memory__read_content"
"mcp__glyph__basic-memory__read_note"
"mcp__glyph__basic-memory__recent_activity"
"mcp__glyph__basic-memory__search"
"mcp__glyph__basic-memory__search_by_metadata"
"mcp__glyph__basic-memory__search_notes"
"mcp__glyph__basic-memory__view_note"
"mcp__glyph__basic-memory__write_note"
# MCP: context7
"mcp__glyph__context7__resolve-library-id"
"mcp__glyph__context7__query-docs"
# MCP: graphite
"mcp__glyph__graphite__learn_gt"
"mcp__glyph__graphite__run_gt_cmd"
# MCP: mcp-nixos
"mcp__glyph__mcp-nixos__nix"
"mcp__glyph__mcp-nixos__nix_versions"
# MCP: deepwiki
"mcp__glyph__deepwiki__ask_question"
"mcp__glyph__deepwiki__read_wiki_contents"
"mcp__glyph__deepwiki__read_wiki_structure"
# MCP: kagi
"mcp__glyph__kagi__kagi_search_fetch"
"mcp__glyph__kagi__kagi_summarizer"
# MCP: aws-knowledge
"mcp__glyph__aws-knowledge__aws___get_regional_availability"
"mcp__glyph__aws-knowledge__aws___list_regions"
"mcp__glyph__aws-knowledge__aws___read_documentation"
"mcp__glyph__aws-knowledge__aws___recommend"
"mcp__glyph__aws-knowledge__aws___search_documentation"
# MCP: grafana
"mcp__glyph__grafana__add_activity_to_incident"
"mcp__glyph__grafana__alerting_manage_routing"
"mcp__glyph__grafana__alerting_manage_rules"
"mcp__glyph__grafana__create_annotation"
"mcp__glyph__grafana__create_folder"
"mcp__glyph__grafana__create_incident"
"mcp__glyph__grafana__fetch_pyroscope_profile"
"mcp__glyph__grafana__find_error_pattern_logs"
"mcp__glyph__grafana__find_slow_requests"
"mcp__glyph__grafana__generate_deeplink"
"mcp__glyph__grafana__get_alert_group"
"mcp__glyph__grafana__get_annotation_tags"
"mcp__glyph__grafana__get_annotations"
"mcp__glyph__grafana__get_assertions"
"mcp__glyph__grafana__get_current_oncall_users"
"mcp__glyph__grafana__get_dashboard_by_uid"
"mcp__glyph__grafana__get_dashboard_panel_queries"
"mcp__glyph__grafana__get_dashboard_property"
"mcp__glyph__grafana__get_dashboard_summary"
"mcp__glyph__grafana__get_datasource"
"mcp__glyph__grafana__get_incident"
"mcp__glyph__grafana__get_oncall_shift"
"mcp__glyph__grafana__get_panel_image"
"mcp__glyph__grafana__get_sift_analysis"
"mcp__glyph__grafana__get_sift_investigation"
"mcp__glyph__grafana__list_alert_groups"
"mcp__glyph__grafana__list_datasources"
"mcp__glyph__grafana__list_incidents"
"mcp__glyph__grafana__list_loki_label_names"
"mcp__glyph__grafana__list_loki_label_values"
"mcp__glyph__grafana__list_oncall_schedules"
"mcp__glyph__grafana__list_oncall_teams"
"mcp__glyph__grafana__list_oncall_users"
"mcp__glyph__grafana__list_prometheus_label_names"
"mcp__glyph__grafana__list_prometheus_label_values"
"mcp__glyph__grafana__list_prometheus_metric_metadata"
"mcp__glyph__grafana__list_prometheus_metric_names"
"mcp__glyph__grafana__list_pyroscope_label_names"
"mcp__glyph__grafana__list_pyroscope_label_values"
"mcp__glyph__grafana__list_pyroscope_profile_types"
"mcp__glyph__grafana__list_sift_investigations"
"mcp__glyph__grafana__query_loki_logs"
"mcp__glyph__grafana__query_loki_patterns"
"mcp__glyph__grafana__query_loki_stats"
"mcp__glyph__grafana__query_prometheus"
"mcp__glyph__grafana__query_prometheus_histogram"
"mcp__glyph__grafana__search_dashboards"
"mcp__glyph__grafana__search_folders"
"mcp__glyph__grafana__update_annotation"
"mcp__glyph__grafana__update_dashboard"
];
deny = [];
};
};
};
})
(mkIf cfg.containers.enable {
home.packages = with pkgs; [
lazydocker
];
services.colima = {
enable = true;
profiles.default = {
isActive = true;
isService = true;
settings = {
cpu = 4;
disk = 60;
memory = 8;
arch = "aarch64";
mountInotify = true;
};
};
};
programs.ssh.includes = [
"~/.colima/ssh_config"
];
})
(mkIf cfg.javascript.enable {
home.packages = with pkgs; let
nodejs = nodejs_24;
yarn = yarn-berry.override {inherit nodejs;};
in [
jo
nodejs
yarn
];
})
];
}