diff --git a/flake.nix b/flake.nix index 09780b9..49055ed 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ # flake for blakes nixos config # define new devices in outputs -# generation: 364, timestamp: 2025-10-12 14:54:50 +# generation: 365, timestamp: 2025-10-12 15:04:31 { description = "blakes nix config"; inputs = { diff --git a/modules/homelab/services/glance/default.nix b/modules/homelab/services/glance/default.nix index 4142861..4fc5d8c 100644 --- a/modules/homelab/services/glance/default.nix +++ b/modules/homelab/services/glance/default.nix @@ -151,15 +151,10 @@ in } { type = "custom-api"; - title = "minecraft recpro"; + title = "recpro"; + url = "https://api.mcstatus.io/v2/status/java/mc.recoil.pro"; cache = "5s"; - allow-insecure = true; - url = "\${CRAFTY_URL}/api/v2/servers/\${CRAFTY_SERVER_ID}/stats"; - headers = { - Authorization = "Bearer \${CRAFTY_API_TOKEN}"; - Accept = "application/json"; - }; - template = "\n\n\n{{ $displayMOTD := true }}\n\n\n\n{{ $is_running := .JSON.Bool \"data.running\" }}\n{{ $online_players := .JSON.Int \"data.online\" | formatNumber }}\n{{ $max_players := .JSON.Int \"data.max\" | formatNumber }}\n{{ $name := .JSON.String \"data.world_name\" }}\n{{ $size := .JSON.String \"data.world_size\" }}\n{{ $version := .JSON.String \"data.version\" }}\n{{ $icon := .JSON.String \"data.icon\" }}\n{{ $server_ip := .JSON.String \"data.server_id.server_ip\" }}\n{{ $server_port := .JSON.String \"data.server_id.server_port\" }}\n{{ $motd := .JSON.String \"data.desc\" }}\n\n{{ $server_addr := \"\" }}\n{{ if and ($is_running) (eq $server_ip \"127.0.0.1\") }}\n {{ $server_addr = printf \"%s:%s\" (replaceMatches \"https?://\" \"\" \"\${CRAFTY_URL}\") $server_port }}\n{{ else if $is_running }}\n {{ $server_addr = printf \"%s:%s\" $server_ip $server_port }}\n{{ end }}\n\n{{ $starting := false }}\n{{ if and ($is_running) (eq $max_players \"0\") (eq $version \"False\") }}\n {{ $starting = true }}\n{{ end }}\n\n\n{{ $updating := .JSON.Bool \"data.updating\" }}\n{{ $importing := .JSON.Bool \"data.importing\" }}\n{{ $crashed := .JSON.Bool \"data.crashed\" }}\n\n
\n \n {{ .JSON.Int \"players.online\" | formatNumber }}/{{ .JSON.Int \"players.max\" | formatNumber }} players\n
\n\n \n 0 players\n
\n\n \n {{ .JSON.Int \"players.online\" | formatNumber }}/{{ .JSON.Int \"players.max\" | formatNumber }} players\n
\n\n \n 0 players\n
\n