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
|
||||
secretName = "grafanaSecret";
|
||||
|
|
@ -14,8 +19,30 @@ in
|
|||
services =
|
||||
let
|
||||
domain = "status.federated.nexus";
|
||||
makeDashboard =
|
||||
{ pkgs, lib, ... }:
|
||||
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 (
|
||||
pkgs.writers.writeJSON "status.json" {
|
||||
title = "Service Status";
|
||||
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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue