Add device architecture documentation and D2 diagram
Some checks failed
Flake checker / Build Nix targets (push) Has been cancelled
Some checks failed
Flake checker / Build Nix targets (push) Has been cancelled
- Add comprehensive DEVICE_ARCHITECTURE.md with detailed device specifications - Create D2 diagram showing device relationships and network topology - Organize assets in dedicated assets/ folder - Document all devices: servers (mirai, deoxys, tsuba), workstations (ryu), and portable devices (kuro, shiro, SteamDeck) - Include deployment flows, network architecture, and build infrastructure
This commit is contained in:
235
assets/devices-diagram.d2
Normal file
235
assets/devices-diagram.d2
Normal file
@@ -0,0 +1,235 @@
|
||||
title: Device Architecture Overview {
|
||||
near: top-center
|
||||
shape: text
|
||||
style: {
|
||||
font-size: 24
|
||||
bold: true
|
||||
}
|
||||
}
|
||||
|
||||
# Device Groups
|
||||
servers: Server Infrastructure {
|
||||
style.fill: "#e8f4fd"
|
||||
style.stroke: "#1e3a8a"
|
||||
style.stroke-width: 2
|
||||
|
||||
mirai: mirai {
|
||||
shape: rectangle
|
||||
style.fill: "#fbbf24"
|
||||
|
||||
label: "mirai\nMain Server\nx86_64-linux\nUser: fs0c131y\nHeadless"
|
||||
|
||||
services: Services {
|
||||
shape: cylinder
|
||||
style.fill: "#34d399"
|
||||
label: "Services\n• Nextcloud\n• Gitea\n• Grafana\n• Minecraft\n• Immich\n• Paperless\n• Tailscale\n• And more..."
|
||||
}
|
||||
}
|
||||
|
||||
deoxys: deoxys {
|
||||
shape: rectangle
|
||||
style.fill: "#a78bfa"
|
||||
label: "deoxys\nVM Server\nx86_64-linux\nUser: servius\nHeadless"
|
||||
}
|
||||
|
||||
tsuba: tsuba {
|
||||
shape: rectangle
|
||||
style.fill: "#fb7185"
|
||||
label: "tsuba\nRaspberry Pi\naarch64-linux\nUser: servius\nHeadless"
|
||||
}
|
||||
}
|
||||
|
||||
workstations: Development Workstations {
|
||||
style.fill: "#f0fdf4"
|
||||
style.stroke: "#15803d"
|
||||
style.stroke-width: 2
|
||||
|
||||
ryu: ryu {
|
||||
shape: rectangle
|
||||
style.fill: "#3b82f6"
|
||||
label: "ryu\nMain Desktop\nx86_64-linux\nUser: servius\nHyprland + GNOME"
|
||||
|
||||
monitors: Multi-Monitor Setup {
|
||||
style.fill: "#ddd6fe"
|
||||
|
||||
primary: "HDMI-A-1\n(Gigabyte FO27Q3)" {
|
||||
shape: rectangle
|
||||
style.fill: "#c4b5fd"
|
||||
}
|
||||
secondary: "DP-3\n(Acer XV272U)" {
|
||||
shape: rectangle
|
||||
style.fill: "#c4b5fd"
|
||||
}
|
||||
tertiary: "DP-1\n(Gigabyte M27Q)" {
|
||||
shape: rectangle
|
||||
style.fill: "#c4b5fd"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mobile: Portable Devices {
|
||||
style.fill: "#fef3c7"
|
||||
style.stroke: "#d97706"
|
||||
style.stroke-width: 2
|
||||
|
||||
kuro: kuro {
|
||||
shape: rectangle
|
||||
style.fill: "#6b7280"
|
||||
label: "kuro\nMacBook\naarch64-darwin\nUser: fs0c131y"
|
||||
}
|
||||
|
||||
shiro: shiro {
|
||||
shape: rectangle
|
||||
style.fill: "#9ca3af"
|
||||
label: "shiro\nMacBook\naarch64-darwin\nUser: servius"
|
||||
}
|
||||
|
||||
deck: SteamDeck {
|
||||
shape: rectangle
|
||||
style.fill: "#ef4444"
|
||||
label: "SteamDeck\nGaming Handheld\nx86_64-linux\nUser: deck\nHome Manager Only"
|
||||
}
|
||||
}
|
||||
|
||||
# Network Infrastructure
|
||||
network: Network Infrastructure {
|
||||
style.fill: "#fdf2f8"
|
||||
style.stroke: "#db2777"
|
||||
style.stroke-width: 2
|
||||
|
||||
tailscale: Tailscale VPN {
|
||||
shape: cloud
|
||||
style.fill: "#ec4899"
|
||||
}
|
||||
|
||||
zerotier: ZeroTier Network {
|
||||
shape: cloud
|
||||
style.fill: "#f97316"
|
||||
}
|
||||
|
||||
local_network: Local Network {
|
||||
shape: cloud
|
||||
style.fill: "#06b6d4"
|
||||
}
|
||||
}
|
||||
|
||||
# Build Infrastructure
|
||||
builders: Build Machines {
|
||||
style.fill: "#f5f5f4"
|
||||
style.stroke: "#525252"
|
||||
style.stroke-width: 2
|
||||
|
||||
build_info: "Distributed Builds\nmirai, shiro (+ tsuba)" {
|
||||
shape: text
|
||||
style.font-size: 14
|
||||
style.bold: true
|
||||
}
|
||||
}
|
||||
|
||||
# Configuration Management
|
||||
config_mgmt: Configuration Management {
|
||||
style.fill: "#fefce8"
|
||||
style.stroke: "#ca8a04"
|
||||
style.stroke-width: 2
|
||||
|
||||
nixos_flake: NixOS Flake {
|
||||
shape: hexagon
|
||||
style.fill: "#facc15"
|
||||
}
|
||||
|
||||
home_manager: Home Manager {
|
||||
shape: hexagon
|
||||
style.fill: "#eab308"
|
||||
}
|
||||
|
||||
darwin: nix-darwin {
|
||||
shape: hexagon
|
||||
style.fill: "#f59e0b"
|
||||
}
|
||||
}
|
||||
|
||||
# Deployment Connections
|
||||
workstations.ryu -> servers.mirai: SSH Deploy {
|
||||
style.stroke: "#059669"
|
||||
style.stroke-width: 2
|
||||
}
|
||||
|
||||
workstations.ryu -> servers.deoxys: SSH Deploy {
|
||||
style.stroke: "#059669"
|
||||
style.stroke-width: 2
|
||||
}
|
||||
|
||||
workstations.ryu -> servers.tsuba: "SSH Deploy\n(tsuba.darksailor.dev)" {
|
||||
style.stroke: "#059669"
|
||||
style.stroke-width: 2
|
||||
}
|
||||
|
||||
mobile.kuro -> servers.mirai: SSH Deploy {
|
||||
style.stroke: "#7c3aed"
|
||||
style.stroke-width: 2
|
||||
}
|
||||
|
||||
mobile.kuro -> mobile.shiro: SSH Deploy {
|
||||
style.stroke: "#7c3aed"
|
||||
style.stroke-width: 2
|
||||
}
|
||||
|
||||
workstations.ryu -> mobile.deck: "SSH Deploy\n(steamdeck)" {
|
||||
style.stroke: "#dc2626"
|
||||
style.stroke-width: 2
|
||||
}
|
||||
|
||||
# Network connections
|
||||
servers.mirai -> network.tailscale
|
||||
servers.deoxys -> network.tailscale
|
||||
servers.tsuba -> network.tailscale
|
||||
workstations.ryu -> network.local_network
|
||||
mobile.deck -> network.tailscale
|
||||
|
||||
servers.mirai -> network.zerotier
|
||||
workstations.ryu -> network.zerotier
|
||||
|
||||
# Build relationships
|
||||
workstations.ryu -> builders: Uses distributed builds
|
||||
mobile.kuro -> builders: Uses distributed builds
|
||||
servers.mirai -> builders: Build server
|
||||
mobile.shiro -> builders: Build server
|
||||
|
||||
# Configuration connections
|
||||
config_mgmt.nixos_flake -> servers.mirai
|
||||
config_mgmt.nixos_flake -> servers.deoxys
|
||||
config_mgmt.nixos_flake -> servers.tsuba
|
||||
config_mgmt.nixos_flake -> workstations.ryu
|
||||
|
||||
config_mgmt.darwin -> mobile.kuro
|
||||
config_mgmt.darwin -> mobile.shiro
|
||||
|
||||
config_mgmt.home_manager -> mobile.deck
|
||||
|
||||
# Legend
|
||||
legend: Legend {
|
||||
near: bottom-right
|
||||
style.fill: "#f9fafb"
|
||||
style.stroke: "#6b7280"
|
||||
|
||||
servers_legend: "🖥️ Servers (headless)" {
|
||||
shape: text
|
||||
style.font-size: 12
|
||||
}
|
||||
|
||||
workstations_legend: "💻 Workstations (GUI)" {
|
||||
shape: text
|
||||
style.font-size: 12
|
||||
}
|
||||
|
||||
mobile_legend: "📱 Portable/Mobile" {
|
||||
shape: text
|
||||
style.font-size: 12
|
||||
}
|
||||
|
||||
deploy_legend: "→ SSH Deploy" {
|
||||
shape: text
|
||||
style.font-size: 12
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user