summaryrefslogtreecommitdiff
path: root/modules/nixos/on-demand-minecraft/systemd-units.dot
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2025-01-29 10:33:21 +0100
committerLinnnus <[email protected]>2025-01-29 10:33:21 +0100
commit827c6802fc8947ca063d969f6356be75f28e1040 (patch)
treef5c6d106189a127b2e9452a798332a8efd04a958 /modules/nixos/on-demand-minecraft/systemd-units.dot
parentfb4230875a77fc4b0a893f664a9431ab75d00e08 (diff)
on-demand-minecraft: Add DOT documentation
Diffstat (limited to 'modules/nixos/on-demand-minecraft/systemd-units.dot')
-rw-r--r--modules/nixos/on-demand-minecraft/systemd-units.dot26
1 files changed, 26 insertions, 0 deletions
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"];
+ }
+}