This commit is contained in:
Ingolf Wagner 2023-03-04 00:32:57 +01:00
commit 3b0afdecf3
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
3 changed files with 62 additions and 59 deletions
nixos/machines/pepe

View file

@ -1,13 +1,13 @@
{ config, ... }:
{
services.nginx.virtualHosts.${config.services.grafana.domain} = {
services.nginx.virtualHosts.${config.services.grafana.settings.server.domain} = {
extraConfig = ''
allow ${config.tinc.private.subnet};
deny all;
'';
locations."/" = {
proxyPass = "http://localhost:${toString config.services.grafana.port}";
proxyPass = "http://localhost:${toString config.services.grafana.settings.server.http_port}";
proxyWebsockets = true;
};
};

View file

@ -1,13 +1,13 @@
let
urls = [
"https://bitwarden.ingolf-wagner.de"
"https://flix.ingolf-wagner.de"
"https://git.ingolf-wagner.de"
"https://ingolf-wagner.de"
"https://nextcloud.ingolf-wagner.de"
"https://nextcloud.ingolf-wagner.de"
"https://tech.ingolf-wagner.de"
{ url = "https://bitwarden.ingolf-wagner.de"; path = ""; }
{ url = "https://flix.ingolf-wagner.de"; path = "web/index.html"; }
{ url = "https://git.ingolf-wagner.de"; path = ""; }
{ url = "https://ingolf-wagner.de"; path = ""; }
{ url = "https://nextcloud.ingolf-wagner.de"; path = "login"; }
{ url = "https://tech.ingolf-wagner.de"; path = ""; }
];
in
{
services.telegraf = {
@ -20,10 +20,12 @@ in
# https://github.com/influxdata/telegraf/tree/master/plugins/inputs < all them plugins
inputs = {
x509_cert = [{
sources = (map (url: "${url}:443") urls);
sources = (map (url: "${url.url}:443") urls);
interval = "30m"; # agent.interval = "10s" is default
}];
http_response = [{ inherit urls; }];
http_response =
let fullUrls = map ({ url, path }: "${url}/${path}") urls;
in [{ urls = fullUrls; }];
processes = { };
systemd_units = { };
internet_speed.interval = "50m";