diff --git a/flake.nix b/flake.nix index 49055ed..62d5e7e 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ # flake for blakes nixos config # define new devices in outputs -# generation: 365, timestamp: 2025-10-12 15:04:31 +# generation: 366, timestamp: 2025-10-12 15:30:09 { description = "blakes nix config"; inputs = { diff --git a/hosts/snowbelle/configuration.nix b/hosts/snowbelle/configuration.nix index 6cd13bc..e757b87 100644 --- a/hosts/snowbelle/configuration.nix +++ b/hosts/snowbelle/configuration.nix @@ -111,6 +111,7 @@ in curl fzf fd + alejandra tree vim lf diff --git a/modules/homelab/services/glance/default.nix b/modules/homelab/services/glance/default.nix index 4fc5d8c..ebb457b 100644 --- a/modules/homelab/services/glance/default.nix +++ b/modules/homelab/services/glance/default.nix @@ -105,7 +105,7 @@ in size = "small"; widgets = [ { type = "calendar"; first-day-of-week = "monday"; } - { type = "server-stats"; servers = [ { type = "local"; name = "violet"; } ]; } + { type = "server-stats"; servers = [ { type = "local"; name = "snowbelle"; } ]; } { type = "clock"; hour-format = "24h"; @@ -162,6 +162,15 @@ in size = "small"; widgets = [ { type = "weather"; location = "Pearland, Texas, United States"; units = "imperial"; hour-format = "24h"; } + { + type = "custom-api"; + title = "uptime"; + title-url = "127.0.0.1:7901"; + url = "127.0.0.1:7901/api/status-page/glance"; + subrequests = {heartbeats = {url = "127.0.0.1:7901/api/status-page/heartbeat/glance";};}; + cache = "10m"; + template = "{{ $hb := .Subrequest \"heartbeats\" }}\n\n{{ if not (.JSON.Exists \"publicGroupList\") }}\n
Error reading response
\n{{ else if eq (len (.JSON.Array \"publicGroupList\")) 0 }}\nNo monitors found
\n{{ else }}\n\n\n \n {{ .JSON.Int \"players.online\" | formatNumber }}/{{ .JSON.Int \"players.max\" | formatNumber }} players\n
\n\n \n 0 players\n
\nError reading response
\n{{ else if eq (len (.JSON.Array \"publicGroupList\")) 0 }}\nNo monitors found
\n{{ else }}\n\n