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:
parent
e1231f8da1
commit
490e2ce1a5
3 changed files with 99 additions and 0 deletions
12
flake.nix
12
flake.nix
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue