nix machine / user configurations

feat(wolumonde): add grafana

ptr.pet 4ae6812c 650352f6

verified
Changed files
+36
dns
hosts
wolumonde
+1
dns/dnsconfig.js
···
A("pmart", WOLUMONDE_IP, TTL(60)),
A("test", WOLUMONDE_IP),
A("webhook", WOLUMONDE_IP),
// thing
TXT("id", "a data endpoint for entity with serial id /90008/."),
TXT("id", "entity linked here uses it/they pronouns. it can be referred to as /dusk/ or /dawn/."),
···
A("pmart", WOLUMONDE_IP, TTL(60)),
A("test", WOLUMONDE_IP),
A("webhook", WOLUMONDE_IP),
+
A("dash", WOLUMONDE_IP), // grafana
// thing
TXT("id", "a data endpoint for entity with serial id /90008/."),
TXT("id", "entity linked here uses it/they pronouns. it can be referred to as /dusk/ or /dawn/."),
+34
hosts/wolumonde/modules/grafana.nix
···
···
+
{config, ...}:
+
let
+
grafanaCfg = config.services.grafana.settings;
+
in
+
{
+
services.grafana = {
+
enable = true;
+
settings = {
+
server = {
+
http_port = 7412;
+
enforce_domain = true;
+
enable_gzip = true;
+
domain = "dash.gaze.systems";
+
};
+
security = {
+
cookie_secure = true;
+
};
+
analytics = {
+
feedback_links_enabled = false;
+
reporting_enabled = false;
+
};
+
};
+
};
+
+
services.nginx.virtualHosts.${grafanaCfg.server.domain} = {
+
useACMEHost = "gaze.systems"; # TODO: write a module to define vhosts for subdomains
+
quic = true;
+
kTLS = true;
+
forceSSL = true;
+
locations."/" = {
+
proxyPass = "http://localhost:${toString grafanaCfg.server.http_port}";
+
};
+
};
+
}
+1
hosts/wolumonde/modules/nginx.nix
···
"dawn.gaze.systems"
"guestbook.gaze.systems"
"webhook.gaze.systems"
];
};
};
···
"dawn.gaze.systems"
"guestbook.gaze.systems"
"webhook.gaze.systems"
+
"dash.gaze.systems"
];
};
};