From 827c6802fc8947ca063d969f6356be75f28e1040 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Wed, 29 Jan 2025 10:33:21 +0100 Subject: on-demand-minecraft: Add DOT documentation --- .../nixos/on-demand-minecraft/systemd-units.dot | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 modules/nixos/on-demand-minecraft/systemd-units.dot (limited to 'modules/nixos/on-demand-minecraft/systemd-units.dot') diff --git a/modules/nixos/on-demand-minecraft/systemd-units.dot b/modules/nixos/on-demand-minecraft/systemd-units.dot new file mode 100644 index 0000000..d208cc0 --- /dev/null +++ b/modules/nixos/on-demand-minecraft/systemd-units.dot @@ -0,0 +1,26 @@ +// This file documents the interactions of the systemd units defined in `default.nix`. +// It exists only to aid readers of the Nix code. +// Make sure to keep the SVG file up to date by running `dot -Tsvg systemd-units.dot >systemd-units.svg`. + +digraph systemd_units { + label = "Systemd unit interactions"; + labelloc = "t"; + + subgraph cluster_start { + label = "Starting up"; + + "minecraft-listen.socket"->"minecraft-listen.service" [color="green", label="Triggers the proxifier upon connection"]; + "minecraft-listen.service"->"minecraft-hook.service" [color="green", label="Runs"]; + "minecraft-hook.service"->"minecraft-server.service" [color="green", label="Starts"]; + } + + subgraph cluster_stop { + label = "Shutting down"; + + "minecraft-hook.service"->"minecraft-stop.timer" [color="green", label="Starts"]; + "minecraft-stop.timer"->"minecraft-stop.service" [color="green", label="Runs every X seconds"]; + "minecraft-stop.service"->"minecraft-server.service" [color="red", label="Stops if conditions are met"]; + "minecraft-stop.service"->"minecraft-stop.timer" [color="red", label="Stops if conditions are met"]; + "minecraft-stop.service"->"minecraft-hook.service" [color="red", label="Stops if conditions are met"]; + } +} -- cgit v1.2.3