inline dashboard
This commit is contained in:
parent
bf3ffa5e0d
commit
64d25ec200
1 changed files with 116 additions and 112 deletions
|
|
@ -1,4 +1,9 @@
|
||||||
{ config, pkgs, ... }@attrs:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
secretName = "grafanaSecret";
|
secretName = "grafanaSecret";
|
||||||
|
|
@ -14,8 +19,30 @@ in
|
||||||
services =
|
services =
|
||||||
let
|
let
|
||||||
domain = "status.federated.nexus";
|
domain = "status.federated.nexus";
|
||||||
makeDashboard =
|
in
|
||||||
{ pkgs, lib, ... }:
|
{
|
||||||
|
grafana = {
|
||||||
|
enable = true;
|
||||||
|
declarativePlugins = [ ];
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
inherit domain;
|
||||||
|
root_url = "https://${domain}";
|
||||||
|
protocol = "socket";
|
||||||
|
};
|
||||||
|
|
||||||
|
security = {
|
||||||
|
cookie_secure = true;
|
||||||
|
secret_key = "$__file{${credentialDirectory}${secretName}}";
|
||||||
|
|
||||||
|
admin_user = "quadradical";
|
||||||
|
admin_password = "$__file{${credentialDirectory}${passwordName}}";
|
||||||
|
};
|
||||||
|
|
||||||
|
"auth.anonymous".enabled = true;
|
||||||
|
analytics.feedback_links_enabled = false;
|
||||||
|
users.default_theme = "system";
|
||||||
|
dashboards.default_home_dashboard_path = toString (
|
||||||
pkgs.writers.writeJSON "status.json" {
|
pkgs.writers.writeJSON "status.json" {
|
||||||
title = "Service Status";
|
title = "Service Status";
|
||||||
refresh = "10s";
|
refresh = "10s";
|
||||||
|
|
@ -123,31 +150,8 @@ in
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
in
|
);
|
||||||
{
|
|
||||||
grafana = {
|
|
||||||
enable = true;
|
|
||||||
declarativePlugins = [ ];
|
|
||||||
settings = {
|
|
||||||
server = {
|
|
||||||
inherit domain;
|
|
||||||
root_url = "https://${domain}";
|
|
||||||
protocol = "socket";
|
|
||||||
};
|
|
||||||
|
|
||||||
security = {
|
|
||||||
cookie_secure = true;
|
|
||||||
secret_key = "$__file{${credentialDirectory}${secretName}}";
|
|
||||||
|
|
||||||
admin_user = "quadradical";
|
|
||||||
admin_password = "$__file{${credentialDirectory}${passwordName}}";
|
|
||||||
};
|
|
||||||
|
|
||||||
"auth.anonymous".enabled = true;
|
|
||||||
analytics.feedback_links_enabled = false;
|
|
||||||
users.default_theme = "system";
|
|
||||||
dashboards.default_home_dashboard_path = toString (makeDashboard attrs);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
provision = {
|
provision = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue