non-critical-infra: add first-time-contribution-tagger
Janik H committed
Aug 9, 2023 at 00:45 UTC
d80e28d3592f503ed267d5fb5eb37ec44d2a98ab
4 files changed
+246
-6
non-critical-infra/flake.lock
+222
-4
@@ -39,6 +39,31 @@
39
"type": "github"
40
}
41
},
42
+ "first-time-contribution-tagger": {
43
+ "inputs": {
44
+ "flake-utils": [
45
+ "flake-utils"
46
+ ],
47
+ "nixpkgs": [
48
+ "nixpkgs"
49
+ ],
50
+ "poetry2nix": "poetry2nix",
51
+ "pre-commit-hooks": "pre-commit-hooks"
52
+ },
53
+ "locked": {
54
+ "lastModified": 1686955840,
55
+ "narHash": "sha256-8g33tg+D0wJWFYQH4GJtX77BOdK+x1F90nw9m7ux+zM=",
56
+ "owner": "Janik-Haag",
57
+ "repo": "first-time-contribution-tagger",
58
+ "rev": "f8e4eb2780f94977671ec68a70d1baa3bae63216",
59
+ "type": "github"
60
+ },
61
+ "original": {
62
+ "owner": "Janik-Haag",
63
+ "repo": "first-time-contribution-tagger",
64
+ "type": "github"
65
+ }
66
+ },
67
"flake-compat": {
68
"flake": false,
69
"locked": {
@@ -55,6 +80,22 @@
80
"type": "github"
81
}
82
},
83
+ "flake-compat_2": {
84
+ "flake": false,
85
+ "locked": {
86
+ "lastModified": 1673956053,
87
+ "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
88
+ "owner": "edolstra",
89
+ "repo": "flake-compat",
90
+ "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
91
+ "type": "github"
92
+ },
93
+ "original": {
94
+ "owner": "edolstra",
95
+ "repo": "flake-compat",
96
+ "type": "github"
97
+ }
98
+ },
99
"flake-utils": {
100
"locked": {
101
"lastModified": 1659877975,
@@ -74,6 +115,42 @@
115
"inputs": {
116
"systems": "systems"
117
},
118
+ "locked": {
119
+ "lastModified": 1685518550,
120
+ "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
121
+ "owner": "numtide",
122
+ "repo": "flake-utils",
123
+ "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
124
+ "type": "github"
125
+ },
126
+ "original": {
127
+ "owner": "numtide",
128
+ "repo": "flake-utils",
129
+ "type": "github"
130
+ }
131
+ },
132
+ "flake-utils_3": {
133
+ "inputs": {
134
+ "systems": "systems_2"
135
+ },
136
+ "locked": {
137
+ "lastModified": 1685518550,
138
+ "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
139
+ "owner": "numtide",
140
+ "repo": "flake-utils",
141
+ "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
142
+ "type": "github"
143
+ },
144
+ "original": {
145
+ "owner": "numtide",
146
+ "repo": "flake-utils",
147
+ "type": "github"
148
+ }
149
+ },
150
+ "flake-utils_4": {
151
+ "inputs": {
152
+ "systems": "systems_3"
153
+ },
154
"locked": {
155
"lastModified": 1689068808,
156
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
@@ -88,6 +165,28 @@
165
"type": "github"
166
}
167
},
168
+ "gitignore": {
169
+ "inputs": {
170
+ "nixpkgs": [
171
+ "first-time-contribution-tagger",
172
+ "pre-commit-hooks",
173
+ "nixpkgs"
174
+ ]
175
+ },
176
+ "locked": {
177
+ "lastModified": 1660459072,
178
+ "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
179
+ "owner": "hercules-ci",
180
+ "repo": "gitignore.nix",
181
+ "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
182
+ "type": "github"
183
+ },
184
+ "original": {
185
+ "owner": "hercules-ci",
186
+ "repo": "gitignore.nix",
187
+ "type": "github"
188
+ }
189
+ },
190
"nixpkgs": {
191
"locked": {
192
"lastModified": 1683408522,
@@ -104,6 +203,22 @@
203
"type": "github"
204
}
205
},
206
+ "nixpkgs-stable": {
207
+ "locked": {
208
+ "lastModified": 1685801374,
209
+ "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
210
+ "owner": "NixOS",
211
+ "repo": "nixpkgs",
212
+ "rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
213
+ "type": "github"
214
+ },
215
+ "original": {
216
+ "owner": "NixOS",
217
+ "ref": "nixos-23.05",
218
+ "repo": "nixpkgs",
219
+ "type": "github"
220
+ }
221
+ },
222
"nixpkgs_2": {
223
"locked": {
224
"lastModified": 1689168768,
@@ -121,6 +236,37 @@
236
}
237
},
238
"nixpkgs_3": {
239
+ "locked": {
240
+ "lastModified": 1686955712,
241
+ "narHash": "sha256-VDJSytcXtyXY74R3v/asQENBGx9/WtUFF/MhBzJPGLM=",
242
+ "owner": "NixOS",
243
+ "repo": "nixpkgs",
244
+ "rev": "b0bb464b79bafd0963faafffb9c21a6a8b405bc6",
245
+ "type": "github"
246
+ },
247
+ "original": {
248
+ "owner": "NixOS",
249
+ "repo": "nixpkgs",
250
+ "type": "github"
251
+ }
252
+ },
253
+ "nixpkgs_4": {
254
+ "locked": {
255
+ "lastModified": 1685866647,
256
+ "narHash": "sha256-4jKguNHY/edLYImB+uL8jKPL/vpfOvMmSlLAGfxSrnY=",
257
+ "owner": "NixOS",
258
+ "repo": "nixpkgs",
259
+ "rev": "a53a3bec10deef6e1cc1caba5bc60f53b959b1e8",
260
+ "type": "github"
261
+ },
262
+ "original": {
263
+ "owner": "NixOS",
264
+ "ref": "nixpkgs-unstable",
265
+ "repo": "nixpkgs",
266
+ "type": "github"
267
+ }
268
+ },
269
+ "nixpkgs_5": {
270
"locked": {
271
"lastModified": 1690726002,
272
"narHash": "sha256-cACz6jCJZtsZHGCJAN4vMobxzH5s6FCOTZHMrh/Hu0M=",
@@ -136,7 +282,7 @@
282
"type": "github"
283
}
284
},
139
- "nixpkgs_4": {
285
+ "nixpkgs_6": {
286
"locked": {
287
"lastModified": 1690327932,
288
"narHash": "sha256-Fv7PYZxN4eo0K6zXhHG/vOc+e2iuqQ5ywDrh0yeRjP0=",
@@ -152,18 +298,60 @@
298
"type": "github"
299
}
300
},
301
+ "poetry2nix": {
302
+ "inputs": {
303
+ "flake-utils": "flake-utils_2",
304
+ "nixpkgs": "nixpkgs_3"
305
+ },
306
+ "locked": {
307
+ "lastModified": 1686707892,
308
+ "narHash": "sha256-j6a1v3VLcGSBITwsmUsXbDnV2dXG66fD7kUlRK0sVT4=",
309
+ "owner": "nix-community",
310
+ "repo": "poetry2nix",
311
+ "rev": "71813779d4cef5fe2ba7de3d6a86f802e9230dd8",
312
+ "type": "github"
313
+ },
314
+ "original": {
315
+ "owner": "nix-community",
316
+ "repo": "poetry2nix",
317
+ "type": "github"
318
+ }
319
+ },
320
+ "pre-commit-hooks": {
321
+ "inputs": {
322
+ "flake-compat": "flake-compat_2",
323
+ "flake-utils": "flake-utils_3",
324
+ "gitignore": "gitignore",
325
+ "nixpkgs": "nixpkgs_4",
326
+ "nixpkgs-stable": "nixpkgs-stable"
327
+ },
328
+ "locked": {
329
+ "lastModified": 1686668298,
330
+ "narHash": "sha256-AADh9NqHh6X2LOem4BvI7oCkMm+JPCSCE7iIw5nn0VA=",
331
+ "owner": "cachix",
332
+ "repo": "pre-commit-hooks.nix",
333
+ "rev": "5b6b54d3f722aa95cbf4ddbe35390a0af8c0015a",
334
+ "type": "github"
335
+ },
336
+ "original": {
337
+ "owner": "cachix",
338
+ "repo": "pre-commit-hooks.nix",
339
+ "type": "github"
340
+ }
341
+ },
342
"root": {
343
"inputs": {
344
"colmena": "colmena",
345
"disko": "disko",
159
- "flake-utils": "flake-utils_2",
160
- "nixpkgs": "nixpkgs_3",
346
+ "first-time-contribution-tagger": "first-time-contribution-tagger",
347
+ "flake-utils": "flake-utils_4",
348
+ "nixpkgs": "nixpkgs_5",
349
"srvos": "srvos"
350
}
351
},
352
"srvos": {
353
"inputs": {
166
- "nixpkgs": "nixpkgs_4"
354
+ "nixpkgs": "nixpkgs_6"
355
},
356
"locked": {
357
"lastModified": 1691135985,
@@ -209,6 +397,36 @@
397
"repo": "default",
398
"type": "github"
399
}
400
+ },
401
+ "systems_2": {
402
+ "locked": {
403
+ "lastModified": 1681028828,
404
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
405
+ "owner": "nix-systems",
406
+ "repo": "default",
407
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
408
+ "type": "github"
409
+ },
410
+ "original": {
411
+ "owner": "nix-systems",
412
+ "repo": "default",
413
+ "type": "github"
414
+ }
415
+ },
416
+ "systems_3": {
417
+ "locked": {
418
+ "lastModified": 1681028828,
419
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
420
+ "owner": "nix-systems",
421
+ "repo": "default",
422
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
423
+ "type": "github"
424
+ },
425
+ "original": {
426
+ "owner": "nix-systems",
427
+ "repo": "default",
428
+ "type": "github"
429
+ }
430
}
431
},
432
"root": "root",
non-critical-infra/flake.nix
+10
-2
@@ -7,9 +7,17 @@
7
flake-utils.url = "github:numtide/flake-utils";
8
disko.url = "github:nix-community/disko";
9
srvos.url = "github:numtide/srvos";
10
+
11
+ first-time-contribution-tagger = {
12
+ url = "github:Janik-Haag/first-time-contribution-tagger";
13
+ inputs = {
14
+ nixpkgs.follows = "nixpkgs";
15
+ flake-utils.follows = "flake-utils";
16
+ };
17
+ };
18
};
19
12
- outputs = { self, nixpkgs, flake-utils, colmena, disko, srvos, ... }@inputs:
20
+ outputs = { self, nixpkgs, flake-utils, colmena, disko, srvos, first-time-contribution-tagger, ... }@inputs:
21
let
22
importConfig = path: (lib.mapAttrs (name: value: import (path + "/${name}/default.nix")) (lib.filterAttrs (_: v: v == "directory") (builtins.readDir path)));
23
lib = nixpkgs.lib;
@@ -23,7 +31,7 @@
31
specialArgs = {
32
inherit inputs;
33
};
26
- modules = [ value disko.nixosModules.disko ];
34
+ modules = [ value disko.nixosModules.disko first-time-contribution-tagger.nixosModule ];
35
extraModules = [ inputs.colmena.nixosModules.deploymentOptions ];
36
37
})
non-critical-infra/hosts/hetzner-01/default.nix
+1
@@ -6,6 +6,7 @@
6
./hardware.nix
7
inputs.srvos.nixosModules.server
8
inputs.srvos.nixosModules.hardware-hetzner-online-amd
9
+ ../../modules/first-time-contribution-tagger.nix
10
];
11
12
non-critical-infra/modules/first-time-contribution-tagger.nix
new
+13
@@ -0,0 +1,13 @@
1
+{
2
+ services.first-time-contribution-tagger = {
3
+ enable = true;
4
+ interval = "*:0/10";
5
+ environment = {
6
+ FIRST_TIME_CONTRIBUTION_LABEL="12. first-time contribution";
7
+ FIRST_TIME_CONTRIBUTION_CACHE="/var/lib/first-time-contribution-tagger/cache";
8
+ FIRST_TIME_CONTRIBUTION_REPO="nixpkgs";
9
+ FIRST_TIME_CONTRIBUTION_ORG="NixOS";
10
+ };
11
+ environmentFile = "/root/first-time-contribution-tagger.env";
12
+ };
13
+}