1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 14:50:40 +02:00

chore: PoC to generate d2 network graph

This commit is contained in:
oddlama 2024-01-05 12:35:55 +01:00
parent e1231f8da1
commit 490e2ce1a5
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
3 changed files with 99 additions and 0 deletions

View file

@ -152,6 +152,18 @@
nixosConfigurationsMinimal
;
# XXX: WIP: only testing
d2diag = let
inherit
(nixpkgs.lib)
attrValues
concatLines
;
in
self.pkgs.x86_64-linux.writeText "test.d2" (
concatLines (map (x: x.config.d2diag.text) (attrValues self.nixosConfigurations))
);
# All nixosSystem instanciations are collected here, so that we can refer
# to any system via nodes.<name>
nodes = self.nixosConfigurations // self.guestConfigs;