add status
This commit is contained in:
parent
bc8f728059
commit
db0d8e7552
2 changed files with 104 additions and 106 deletions
|
|
@ -20,9 +20,6 @@ in
|
|||
enable = true;
|
||||
declarativePlugins = [ ];
|
||||
settings = {
|
||||
"auth.anonymous".enabled = true;
|
||||
analytics.feedback_links_enabled = false;
|
||||
users.default_theme = "system";
|
||||
server = {
|
||||
inherit domain;
|
||||
root_url = "https://${domain}";
|
||||
|
|
@ -37,34 +34,10 @@ in
|
|||
admin_password = "$__file{${credentialDirectory}${passwordName}}";
|
||||
};
|
||||
|
||||
dashboards.default_home_dashboard_path = toString (
|
||||
(import ../../../lib/status.nix attrs) [
|
||||
{
|
||||
name = "Matrix";
|
||||
service = "continuwuity.service";
|
||||
}
|
||||
{
|
||||
name = "LaSuite Docs";
|
||||
service = "lasuite-docs.service";
|
||||
}
|
||||
{
|
||||
name = "Forgejo (Git)";
|
||||
service = "forgejo.service";
|
||||
}
|
||||
{
|
||||
name = "SearXNG (Search)";
|
||||
service = "searx.service";
|
||||
}
|
||||
{
|
||||
name = "Redlib";
|
||||
service = "redlib.service";
|
||||
}
|
||||
{
|
||||
name = "GMessages Bridge";
|
||||
service = "matrix-as-gmessages.service";
|
||||
}
|
||||
]
|
||||
);
|
||||
"auth.anonymous".enabled = true;
|
||||
analytics.feedback_links_enabled = false;
|
||||
users.default_theme = "system";
|
||||
dashboards.default_home_dashboard_path = toString (import ../../../lib/status.nix attrs);
|
||||
};
|
||||
|
||||
provision = {
|
||||
|
|
|
|||
|
|
@ -1,35 +1,33 @@
|
|||
{ pkgs, lib, ... }:
|
||||
services:
|
||||
|
||||
# {
|
||||
# "collapsed": false,
|
||||
# "gridPos": {
|
||||
# "h": 1,
|
||||
# "w": 24,
|
||||
# "x": 0,
|
||||
# "y": 0
|
||||
# },
|
||||
# "id": 261,
|
||||
# "panels": [],
|
||||
# "title": "Quick CPU / Mem / Disk",
|
||||
# "type": "row"
|
||||
# },
|
||||
pkgs.writers.writeJSON "status.json" {
|
||||
title = "Service Status";
|
||||
panels = [
|
||||
panels =
|
||||
let
|
||||
status = null;
|
||||
offset = if status == null then 8 else 0;
|
||||
in
|
||||
(lib.optionals (status != null) [
|
||||
{
|
||||
gridPos.w = 100;
|
||||
title = "Status Update";
|
||||
type = "text";
|
||||
options.content = status;
|
||||
}
|
||||
])
|
||||
++ [
|
||||
{
|
||||
collapsed = false;
|
||||
title = "Federated Nexus Service Statuses";
|
||||
type = "row";
|
||||
gridPos = {
|
||||
h = 1;
|
||||
h = 8;
|
||||
w = 24;
|
||||
x = 0;
|
||||
y = 0;
|
||||
y = offset;
|
||||
};
|
||||
}
|
||||
]
|
||||
++ (lib.imap0 (
|
||||
++ (lib.imap0
|
||||
(
|
||||
index:
|
||||
{ name, service }:
|
||||
{
|
||||
|
|
@ -39,7 +37,7 @@ pkgs.writers.writeJSON "status.json" {
|
|||
h = 3;
|
||||
w = 4;
|
||||
x = index * w;
|
||||
y = (index * h) + 8;
|
||||
y = (index * h) + offset + 8;
|
||||
};
|
||||
datasource = {
|
||||
type = "prometheus";
|
||||
|
|
@ -79,5 +77,32 @@ pkgs.writers.writeJSON "status.json" {
|
|||
}
|
||||
];
|
||||
}
|
||||
) services);
|
||||
)
|
||||
[
|
||||
{
|
||||
name = "Matrix";
|
||||
service = "continuwuity.service";
|
||||
}
|
||||
{
|
||||
name = "LaSuite Docs";
|
||||
service = "lasuite-docs.service";
|
||||
}
|
||||
{
|
||||
name = "Forgejo (Git)";
|
||||
service = "forgejo.service";
|
||||
}
|
||||
{
|
||||
name = "SearXNG (Search)";
|
||||
service = "searx.service";
|
||||
}
|
||||
{
|
||||
name = "Redlib";
|
||||
service = "redlib.service";
|
||||
}
|
||||
{
|
||||
name = "GMessages Bridge";
|
||||
service = "matrix-as-gmessages.service";
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue