diff options
-rw-r--r-- | flake.lock | 197 | ||||
-rw-r--r-- | flake.nix | 23 | ||||
-rw-r--r-- | shell.nix | 1 | ||||
-rw-r--r-- | tools/sops-inventory/default.nix | 17 | ||||
-rw-r--r-- | tools/sops-inventory/poetry.lock | 56 | ||||
-rw-r--r-- | tools/sops-inventory/pyproject.toml | 17 | ||||
-rw-r--r-- | tools/sops-inventory/setup.py | 11 | ||||
-rw-r--r-- | tools/sops-inventory/sops_inventory/__main__.py | 4 |
8 files changed, 229 insertions, 97 deletions
@@ -25,27 +25,23 @@ | |||
25 | }, | 25 | }, |
26 | "ca-util": { | 26 | "ca-util": { |
27 | "inputs": { | 27 | "inputs": { |
28 | "mach-nix": [ | 28 | "flake-parts": "flake-parts_2", |
29 | "mach-nix" | ||
30 | ], | ||
31 | "nixpkgs": [ | 29 | "nixpkgs": [ |
32 | "nixpkgs" | 30 | "nixpkgs" |
33 | ], | 31 | ], |
34 | "pypi-deps-db": [ | 32 | "pre-commit-hooks-nix": "pre-commit-hooks-nix_2" |
35 | "pypi-deps-db" | ||
36 | ] | ||
37 | }, | 33 | }, |
38 | "locked": { | 34 | "locked": { |
39 | "lastModified": 1680609133, | 35 | "lastModified": 1681061268, |
40 | "narHash": "sha256-1XpMskoVuRaQ0m+sezbsLXyrZjRNWNZTFbZyRN5R90w=", | 36 | "narHash": "sha256-Da3NnXe1qYD7lmlsKyEeq/Z1TahmBc8VRtALu96v04A=", |
41 | "owner": "gkleen", | 37 | "owner": "gkleen", |
42 | "repo": "ca", | 38 | "repo": "ca", |
43 | "rev": "2fec64bb3e069eb97ab7569c4e2e8cd761452f34", | 39 | "rev": "6cd1e33a06da36fcba37cd8c4d6a7eed0f7673bd", |
44 | "type": "gitlab" | 40 | "type": "gitlab" |
45 | }, | 41 | }, |
46 | "original": { | 42 | "original": { |
47 | "owner": "gkleen", | 43 | "owner": "gkleen", |
48 | "ref": "v2.0.3", | 44 | "ref": "v2.0.4", |
49 | "repo": "ca", | 45 | "repo": "ca", |
50 | "type": "gitlab" | 46 | "type": "gitlab" |
51 | } | 47 | } |
@@ -105,6 +101,22 @@ | |||
105 | }, | 101 | }, |
106 | "original": { | 102 | "original": { |
107 | "owner": "edolstra", | 103 | "owner": "edolstra", |
104 | "repo": "flake-compat", | ||
105 | "type": "github" | ||
106 | } | ||
107 | }, | ||
108 | "flake-compat_3": { | ||
109 | "flake": false, | ||
110 | "locked": { | ||
111 | "lastModified": 1673956053, | ||
112 | "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", | ||
113 | "owner": "edolstra", | ||
114 | "repo": "flake-compat", | ||
115 | "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", | ||
116 | "type": "github" | ||
117 | }, | ||
118 | "original": { | ||
119 | "owner": "edolstra", | ||
108 | "ref": "master", | 120 | "ref": "master", |
109 | "repo": "flake-compat", | 121 | "repo": "flake-compat", |
110 | "type": "github" | 122 | "type": "github" |
@@ -128,6 +140,24 @@ | |||
128 | "type": "github" | 140 | "type": "github" |
129 | } | 141 | } |
130 | }, | 142 | }, |
143 | "flake-parts_2": { | ||
144 | "inputs": { | ||
145 | "nixpkgs-lib": "nixpkgs-lib_2" | ||
146 | }, | ||
147 | "locked": { | ||
148 | "lastModified": 1680392223, | ||
149 | "narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=", | ||
150 | "owner": "hercules-ci", | ||
151 | "repo": "flake-parts", | ||
152 | "rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5", | ||
153 | "type": "github" | ||
154 | }, | ||
155 | "original": { | ||
156 | "owner": "hercules-ci", | ||
157 | "repo": "flake-parts", | ||
158 | "type": "github" | ||
159 | } | ||
160 | }, | ||
131 | "flake-registry": { | 161 | "flake-registry": { |
132 | "flake": false, | 162 | "flake": false, |
133 | "locked": { | 163 | "locked": { |
@@ -161,6 +191,21 @@ | |||
161 | }, | 191 | }, |
162 | "flake-utils_2": { | 192 | "flake-utils_2": { |
163 | "locked": { | 193 | "locked": { |
194 | "lastModified": 1667395993, | ||
195 | "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", | ||
196 | "owner": "numtide", | ||
197 | "repo": "flake-utils", | ||
198 | "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", | ||
199 | "type": "github" | ||
200 | }, | ||
201 | "original": { | ||
202 | "owner": "numtide", | ||
203 | "repo": "flake-utils", | ||
204 | "type": "github" | ||
205 | } | ||
206 | }, | ||
207 | "flake-utils_3": { | ||
208 | "locked": { | ||
164 | "lastModified": 1676283394, | 209 | "lastModified": 1676283394, |
165 | "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", | 210 | "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", |
166 | "owner": "numtide", | 211 | "owner": "numtide", |
@@ -197,54 +242,49 @@ | |||
197 | "type": "github" | 242 | "type": "github" |
198 | } | 243 | } |
199 | }, | 244 | }, |
200 | "home-manager": { | 245 | "gitignore_2": { |
201 | "inputs": { | 246 | "inputs": { |
202 | "nixpkgs": [ | 247 | "nixpkgs": [ |
248 | "ca-util", | ||
249 | "pre-commit-hooks-nix", | ||
203 | "nixpkgs" | 250 | "nixpkgs" |
204 | ], | ||
205 | "utils": [ | ||
206 | "flake-utils" | ||
207 | ] | 251 | ] |
208 | }, | 252 | }, |
209 | "locked": { | 253 | "locked": { |
210 | "lastModified": 1673654363, | 254 | "lastModified": 1660459072, |
211 | "narHash": "sha256-dBA0iqALyz2J6W02ggttJaIICs/ksku9ZFB5ffoJ7nA=", | 255 | "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", |
212 | "owner": "pasqui23", | 256 | "owner": "hercules-ci", |
213 | "repo": "home-manager", | 257 | "repo": "gitignore.nix", |
214 | "rev": "860d9f96de3c02ca3d5121f1a4b6d457c48a3c80", | 258 | "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", |
215 | "type": "github" | 259 | "type": "github" |
216 | }, | 260 | }, |
217 | "original": { | 261 | "original": { |
218 | "owner": "pasqui23", | 262 | "owner": "hercules-ci", |
219 | "repo": "home-manager", | 263 | "repo": "gitignore.nix", |
220 | "rev": "860d9f96de3c02ca3d5121f1a4b6d457c48a3c80", | ||
221 | "type": "github" | 264 | "type": "github" |
222 | } | 265 | } |
223 | }, | 266 | }, |
224 | "mach-nix": { | 267 | "home-manager": { |
225 | "inputs": { | 268 | "inputs": { |
226 | "flake-utils": [ | ||
227 | "flake-utils" | ||
228 | ], | ||
229 | "nixpkgs": [ | 269 | "nixpkgs": [ |
230 | "nixpkgs" | 270 | "nixpkgs" |
231 | ], | 271 | ], |
232 | "pypi-deps-db": [ | 272 | "utils": [ |
233 | "pypi-deps-db" | 273 | "flake-utils" |
234 | ] | 274 | ] |
235 | }, | 275 | }, |
236 | "locked": { | 276 | "locked": { |
237 | "lastModified": 1662635943, | 277 | "lastModified": 1673654363, |
238 | "narHash": "sha256-1OBBlBzZ894or8eHZjyADOMnGH89pPUKYGVVS5rwW/0=", | 278 | "narHash": "sha256-dBA0iqALyz2J6W02ggttJaIICs/ksku9ZFB5ffoJ7nA=", |
239 | "owner": "DavHau", | 279 | "owner": "pasqui23", |
240 | "repo": "mach-nix", | 280 | "repo": "home-manager", |
241 | "rev": "65266b5cc867fec2cb6a25409dd7cd12251f6107", | 281 | "rev": "860d9f96de3c02ca3d5121f1a4b6d457c48a3c80", |
242 | "type": "github" | 282 | "type": "github" |
243 | }, | 283 | }, |
244 | "original": { | 284 | "original": { |
245 | "owner": "DavHau", | 285 | "owner": "pasqui23", |
246 | "ref": "65266b5cc867fec2cb6a25409dd7cd12251f6107", | 286 | "repo": "home-manager", |
247 | "repo": "mach-nix", | 287 | "rev": "860d9f96de3c02ca3d5121f1a4b6d457c48a3c80", |
248 | "type": "github" | 288 | "type": "github" |
249 | } | 289 | } |
250 | }, | 290 | }, |
@@ -303,6 +343,24 @@ | |||
303 | "type": "github" | 343 | "type": "github" |
304 | } | 344 | } |
305 | }, | 345 | }, |
346 | "nixpkgs-lib_2": { | ||
347 | "locked": { | ||
348 | "dir": "lib", | ||
349 | "lastModified": 1680213900, | ||
350 | "narHash": "sha256-cIDr5WZIj3EkKyCgj/6j3HBH4Jj1W296z7HTcWj1aMA=", | ||
351 | "owner": "NixOS", | ||
352 | "repo": "nixpkgs", | ||
353 | "rev": "e3652e0735fbec227f342712f180f4f21f0594f2", | ||
354 | "type": "github" | ||
355 | }, | ||
356 | "original": { | ||
357 | "dir": "lib", | ||
358 | "owner": "NixOS", | ||
359 | "ref": "nixos-unstable", | ||
360 | "repo": "nixpkgs", | ||
361 | "type": "github" | ||
362 | } | ||
363 | }, | ||
306 | "nixpkgs-stable": { | 364 | "nixpkgs-stable": { |
307 | "locked": { | 365 | "locked": { |
308 | "lastModified": 1678614274, | 366 | "lastModified": 1678614274, |
@@ -321,6 +379,22 @@ | |||
321 | }, | 379 | }, |
322 | "nixpkgs-stable_2": { | 380 | "nixpkgs-stable_2": { |
323 | "locked": { | 381 | "locked": { |
382 | "lastModified": 1678872516, | ||
383 | "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", | ||
384 | "owner": "NixOS", | ||
385 | "repo": "nixpkgs", | ||
386 | "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", | ||
387 | "type": "github" | ||
388 | }, | ||
389 | "original": { | ||
390 | "owner": "NixOS", | ||
391 | "ref": "nixos-22.11", | ||
392 | "repo": "nixpkgs", | ||
393 | "type": "github" | ||
394 | } | ||
395 | }, | ||
396 | "nixpkgs-stable_3": { | ||
397 | "locked": { | ||
324 | "lastModified": 1669833724, | 398 | "lastModified": 1669833724, |
325 | "narHash": "sha256-/HEZNyGbnQecrgJnfE8d0WC5c1xuPSD2LUpB6YXlg4c=", | 399 | "narHash": "sha256-/HEZNyGbnQecrgJnfE8d0WC5c1xuPSD2LUpB6YXlg4c=", |
326 | "owner": "NixOS", | 400 | "owner": "NixOS", |
@@ -337,6 +411,22 @@ | |||
337 | }, | 411 | }, |
338 | "nixpkgs_2": { | 412 | "nixpkgs_2": { |
339 | "locked": { | 413 | "locked": { |
414 | "lastModified": 1678898370, | ||
415 | "narHash": "sha256-xTICr1j+uat5hk9FyuPOFGxpWHdJRibwZC+ATi0RbtE=", | ||
416 | "owner": "NixOS", | ||
417 | "repo": "nixpkgs", | ||
418 | "rev": "ac718d02867a84b42522a0ece52d841188208f2c", | ||
419 | "type": "github" | ||
420 | }, | ||
421 | "original": { | ||
422 | "owner": "NixOS", | ||
423 | "ref": "nixos-unstable", | ||
424 | "repo": "nixpkgs", | ||
425 | "type": "github" | ||
426 | } | ||
427 | }, | ||
428 | "nixpkgs_3": { | ||
429 | "locked": { | ||
340 | "lastModified": 1677329548, | 430 | "lastModified": 1677329548, |
341 | "narHash": "sha256-ioEmHjeuCVQfJoR7X8jAXuVcEiZxh7A4bR/Jk2DFlmI=", | 431 | "narHash": "sha256-ioEmHjeuCVQfJoR7X8jAXuVcEiZxh7A4bR/Jk2DFlmI=", |
342 | "owner": "NixOS", | 432 | "owner": "NixOS", |
@@ -400,20 +490,25 @@ | |||
400 | "type": "github" | 490 | "type": "github" |
401 | } | 491 | } |
402 | }, | 492 | }, |
403 | "pypi-deps-db": { | 493 | "pre-commit-hooks-nix_2": { |
404 | "flake": false, | 494 | "inputs": { |
495 | "flake-compat": "flake-compat_2", | ||
496 | "flake-utils": "flake-utils_2", | ||
497 | "gitignore": "gitignore_2", | ||
498 | "nixpkgs": "nixpkgs_2", | ||
499 | "nixpkgs-stable": "nixpkgs-stable_2" | ||
500 | }, | ||
405 | "locked": { | 501 | "locked": { |
406 | "lastModified": 1670518748, | 502 | "lastModified": 1680981441, |
407 | "narHash": "sha256-pfUce0zlRI+tzxPgvRSKkusjxDCBVjCpkcDKWboHa+U=", | 503 | "narHash": "sha256-Tqr2mCVssUVp1ZXXMpgYs9+ZonaWrZGPGltJz94FYi4=", |
408 | "owner": "DavHau", | 504 | "owner": "cachix", |
409 | "repo": "pypi-deps-db", | 505 | "repo": "pre-commit-hooks.nix", |
410 | "rev": "e9571cac25d2f509e44fec9dc94a3703a40126ff", | 506 | "rev": "2144d9ddcb550d6dce64a2b44facdc8c5ea2e28a", |
411 | "type": "github" | 507 | "type": "github" |
412 | }, | 508 | }, |
413 | "original": { | 509 | "original": { |
414 | "owner": "DavHau", | 510 | "owner": "cachix", |
415 | "ref": "e9571cac25d2f509e44fec9dc94a3703a40126ff", | 511 | "repo": "pre-commit-hooks.nix", |
416 | "repo": "pypi-deps-db", | ||
417 | "type": "github" | 512 | "type": "github" |
418 | } | 513 | } |
419 | }, | 514 | }, |
@@ -422,16 +517,14 @@ | |||
422 | "backup-utils": "backup-utils", | 517 | "backup-utils": "backup-utils", |
423 | "ca-util": "ca-util", | 518 | "ca-util": "ca-util", |
424 | "deploy-rs": "deploy-rs", | 519 | "deploy-rs": "deploy-rs", |
425 | "flake-compat": "flake-compat_2", | 520 | "flake-compat": "flake-compat_3", |
426 | "flake-registry": "flake-registry", | 521 | "flake-registry": "flake-registry", |
427 | "flake-utils": "flake-utils_2", | 522 | "flake-utils": "flake-utils_3", |
428 | "home-manager": "home-manager", | 523 | "home-manager": "home-manager", |
429 | "mach-nix": "mach-nix", | ||
430 | "nix-index-database": "nix-index-database", | 524 | "nix-index-database": "nix-index-database", |
431 | "nixpkgs": "nixpkgs_2", | 525 | "nixpkgs": "nixpkgs_3", |
432 | "nixpkgs-stable": "nixpkgs-stable_2", | 526 | "nixpkgs-stable": "nixpkgs-stable_3", |
433 | "nvfetcher": "nvfetcher", | 527 | "nvfetcher": "nvfetcher", |
434 | "pypi-deps-db": "pypi-deps-db", | ||
435 | "sops-nix": "sops-nix" | 528 | "sops-nix": "sops-nix" |
436 | } | 529 | } |
437 | }, | 530 | }, |
@@ -88,34 +88,13 @@ | |||
88 | }; | 88 | }; |
89 | }; | 89 | }; |
90 | 90 | ||
91 | pypi-deps-db = { | ||
92 | type = "github"; | ||
93 | owner = "DavHau"; | ||
94 | repo = "pypi-deps-db"; | ||
95 | ref = "e9571cac25d2f509e44fec9dc94a3703a40126ff"; | ||
96 | flake = false; | ||
97 | }; | ||
98 | mach-nix = { | ||
99 | type = "github"; | ||
100 | owner = "DavHau"; | ||
101 | repo = "mach-nix"; | ||
102 | ref = "65266b5cc867fec2cb6a25409dd7cd12251f6107"; | ||
103 | inputs = { | ||
104 | nixpkgs.follows = "nixpkgs"; | ||
105 | flake-utils.follows = "flake-utils"; | ||
106 | pypi-deps-db.follows = "pypi-deps-db"; | ||
107 | }; | ||
108 | }; | ||
109 | |||
110 | ca-util = { | 91 | ca-util = { |
111 | type = "gitlab"; | 92 | type = "gitlab"; |
112 | owner = "gkleen"; | 93 | owner = "gkleen"; |
113 | repo = "ca"; | 94 | repo = "ca"; |
114 | ref = "v2.0.3"; | 95 | ref = "v2.0.4"; |
115 | inputs = { | 96 | inputs = { |
116 | nixpkgs.follows = "nixpkgs"; | 97 | nixpkgs.follows = "nixpkgs"; |
117 | mach-nix.follows = "mach-nix"; | ||
118 | pypi-deps-db.follows = "pypi-deps-db"; | ||
119 | }; | 98 | }; |
120 | }; | 99 | }; |
121 | backup-utils = { | 100 | backup-utils = { |
@@ -16,5 +16,4 @@ in pkgs.mkShell { | |||
16 | ca-util.packages.${system}.ca | 16 | ca-util.packages.${system}.ca |
17 | poetry | 17 | poetry |
18 | ]); | 18 | ]); |
19 | |||
20 | } | 19 | } |
diff --git a/tools/sops-inventory/default.nix b/tools/sops-inventory/default.nix index 938d99ce..32972ba9 100644 --- a/tools/sops-inventory/default.nix +++ b/tools/sops-inventory/default.nix | |||
@@ -1,16 +1,13 @@ | |||
1 | { system, self, mach-nix, ... }: | 1 | { system, self, ... }: |
2 | |||
2 | let | 3 | let |
3 | pkgs = self.legacyPackages.${system}; | 4 | pkgs = self.legacyPackages.${system}; |
4 | in mach-nix.lib.${system}.buildPythonPackage { | 5 | in |
5 | pname = "sops-inventory"; | 6 | with pkgs.poetry2nix; |
6 | version = "0.0.0"; | 7 | mkPoetryApplication { |
7 | 8 | projectDir = cleanPythonSources { src = ./.; }; | |
8 | src = pkgs.lib.sourceByRegex ./. ["^setup\.py$" "^sops_inventory(/[^/]+.*)?$"]; | ||
9 | 9 | ||
10 | ignoreDataOutdated = true; | 10 | nativeBuildInputs = with pkgs; [ makeWrapper ]; |
11 | requirements = '' | ||
12 | pyyaml | ||
13 | ''; | ||
14 | 11 | ||
15 | postInstall = '' | 12 | postInstall = '' |
16 | wrapProgram $out/bin/sops-inventory \ | 13 | wrapProgram $out/bin/sops-inventory \ |
diff --git a/tools/sops-inventory/poetry.lock b/tools/sops-inventory/poetry.lock new file mode 100644 index 00000000..93fa96de --- /dev/null +++ b/tools/sops-inventory/poetry.lock | |||
@@ -0,0 +1,56 @@ | |||
1 | # This file is automatically @generated by Poetry and should not be changed by hand. | ||
2 | |||
3 | [[package]] | ||
4 | name = "pyyaml" | ||
5 | version = "6.0" | ||
6 | description = "YAML parser and emitter for Python" | ||
7 | category = "main" | ||
8 | optional = false | ||
9 | python-versions = ">=3.6" | ||
10 | files = [ | ||
11 | {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, | ||
12 | {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, | ||
13 | {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, | ||
14 | {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, | ||
15 | {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, | ||
16 | {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, | ||
17 | {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, | ||
18 | {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"}, | ||
19 | {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"}, | ||
20 | {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"}, | ||
21 | {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"}, | ||
22 | {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"}, | ||
23 | {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"}, | ||
24 | {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"}, | ||
25 | {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, | ||
26 | {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, | ||
27 | {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, | ||
28 | {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, | ||
29 | {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, | ||
30 | {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, | ||
31 | {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, | ||
32 | {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, | ||
33 | {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, | ||
34 | {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, | ||
35 | {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, | ||
36 | {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, | ||
37 | {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, | ||
38 | {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, | ||
39 | {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, | ||
40 | {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, | ||
41 | {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, | ||
42 | {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, | ||
43 | {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, | ||
44 | {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, | ||
45 | {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, | ||
46 | {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, | ||
47 | {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, | ||
48 | {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, | ||
49 | {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, | ||
50 | {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, | ||
51 | ] | ||
52 | |||
53 | [metadata] | ||
54 | lock-version = "2.0" | ||
55 | python-versions = "^3.10" | ||
56 | content-hash = "9fc7d221b15352d2ee668151f2c2c9d2eb7b7c6eb4a5d4ddcabb94e71f6b9fb7" | ||
diff --git a/tools/sops-inventory/pyproject.toml b/tools/sops-inventory/pyproject.toml new file mode 100644 index 00000000..c78588fc --- /dev/null +++ b/tools/sops-inventory/pyproject.toml | |||
@@ -0,0 +1,17 @@ | |||
1 | [tool.poetry] | ||
2 | name = "sops_inventory" | ||
3 | version = "0.0.0" | ||
4 | description = "" | ||
5 | authors = ["Gregor Kleen <gkleen@yggdrasil.li>"] | ||
6 | |||
7 | [tool.poetry.dependencies] | ||
8 | python = "^3.10" | ||
9 | pyyaml = "^6.0" | ||
10 | |||
11 | |||
12 | [tool.poetry.scripts] | ||
13 | sops-inventory = 'sops_inventory.__main__:main' | ||
14 | |||
15 | [build-system] | ||
16 | requires = ["poetry-core"] | ||
17 | build-backend = "poetry.core.masonry.api" | ||
diff --git a/tools/sops-inventory/setup.py b/tools/sops-inventory/setup.py deleted file mode 100644 index 3ea2a5d1..00000000 --- a/tools/sops-inventory/setup.py +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | from setuptools import setup | ||
2 | |||
3 | setup( | ||
4 | name='sops-inventory', | ||
5 | packages=['sops_inventory'], | ||
6 | entry_points={ | ||
7 | 'console_scripts': [ | ||
8 | 'sops-inventory=sops_inventory.__main__:main' | ||
9 | ], | ||
10 | }, | ||
11 | ) | ||
diff --git a/tools/sops-inventory/sops_inventory/__main__.py b/tools/sops-inventory/sops_inventory/__main__.py index aaddda8c..f43b7c2f 100644 --- a/tools/sops-inventory/sops_inventory/__main__.py +++ b/tools/sops-inventory/sops_inventory/__main__.py | |||
@@ -20,12 +20,14 @@ except ImportError: | |||
20 | 20 | ||
21 | SOPS_TYPES = frozenset({'kms', 'gcp_kms', 'azure_kv', 'hc_vault', 'age', 'pgp'}) | 21 | SOPS_TYPES = frozenset({'kms', 'gcp_kms', 'azure_kv', 'hc_vault', 'age', 'pgp'}) |
22 | 22 | ||
23 | BUFFER_SIZE = os.sysconf('SC_PAGESIZE') | ||
24 | |||
23 | 25 | ||
24 | def readnull(fh): | 26 | def readnull(fh): |
25 | buffer = b'' | 27 | buffer = b'' |
26 | 28 | ||
27 | while True: | 29 | while True: |
28 | chunk = fh.read(4096) | 30 | chunk = fh.read(BUFFER_SIZE) |
29 | buffer += chunk | 31 | buffer += chunk |
30 | if not buffer: | 32 | if not buffer: |
31 | break | 33 | break |