diff --git a/flake.nix b/flake.nix index 3969816..09780b9 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ # flake for blakes nixos config # define new devices in outputs -# generation: 363, timestamp: 2025-10-12 14:16:09 +# generation: 364, timestamp: 2025-10-12 14:54:50 { description = "blakes nix config"; inputs = { diff --git a/modules/homelab/services/glance/default.nix b/modules/homelab/services/glance/default.nix index f2635a4..4142861 100644 --- a/modules/homelab/services/glance/default.nix +++ b/modules/homelab/services/glance/default.nix @@ -98,7 +98,7 @@ in }; pages = [ { - name = "violet"; + name = "snowbelle"; hide-desktop-navigation = true; columns = [ { @@ -136,46 +136,30 @@ in cache = "1m"; title = "services"; sites = cfg.links.services; -# sites = [ -# { title = "jellyfin"; url = "https://media.blakedheld.xyz"; icon = "di:jellyfin"; } -# { title = "audiobookshelf"; url = "https://audiobooks.blakedheld.xyz"; icon = "di:audiobookshelf"; } -# { title = "yacreader"; url = "http://10.10.0.30:3434"; icon = "/assets/icons/yacreader.png"; } -# { title = "sonarr"; url = "http://10.10.0.30:3636"; icon = "di:sonarr"; } -# { title = "qbittorrent"; url = "http://10.10.0.40:3333"; icon = "di:qbittorrent"; } -# { title = "radarr"; url = "http://10.10.0.30:3737"; icon = "di:radarr"; } -# { title = "kiwix"; url = "http://10.10.0.30:5050"; icon = "di:kiwix"; } -# { title = "prowlarr"; url = "http://10.10.0.30:3535"; icon = "di:prowlarr"; } -# { title = "bazarr"; url = "http://10.10.0.30:3838"; icon = "di:bazarr"; } -# ]; } { type = "monitor"; cache = "1m"; title = "mediastack"; sites = cfg.links.mediastack; -# [ -# { title = "immich"; url = "https://pics.blakedheld.xyz"; icon = "di:immich"; } -# { title = "vaultwarden"; url = "https://pass.blakedheld.xyz"; icon = "di:vaultwarden"; } -# { title = "gitea"; url = "https://git.blakedheld.xyz"; icon = "di:gitea"; } -# { title = "home assistant"; url = "https://home.blakedheld.xyz"; icon = "di:home-assistant"; } -# { title = "zigbee2mqtt"; url = "http://10.10.0.30:4142"; icon = "di:zigbee2mqtt"; } -# { title = "syncthing"; url = "http://10.10.0.20:2222"; icon = "di:syncthing"; } -# { title = "archivebox"; url = "http://10.10.0.30:5656"; icon = "sh:archivebox"; } -# { title = "copyparty"; url = "http://10.10.0.20:3923"; icon = "sh:copyparty"; } -# ]; } { type = "monitor"; cache = "1m"; title = "system"; sites = cfg.links.system; -# [ -# { title = "proxmox"; url = "http://10.10.0.10:8006"; icon = "di:proxmox"; allow-insecure = true; } -# { title = "nginx"; url = "http://10.10.0.30:8080"; icon = "di:nginx"; } -# { title = "uptime kuma"; url = "http://10.10.0.30:8181"; icon = "di:uptime-kuma"; } -# { title = "tn holocron"; url = "https://10.10.0.20"; icon = "di:truenas"; allow-insecure = true; } -# { title = "bebe"; url = "https://10.10.0.1"; icon = "di:unifi"; allow-insecure = true; } -# ]; + } + { + type = "custom-api"; + title = "minecraft recpro"; + 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