backing up the working dir

This commit is contained in:
Jay Looney 2025-10-28 16:10:19 -05:00
parent 82f1d9d5c9
commit b8d125d448
19 changed files with 622 additions and 4 deletions

View file

@ -0,0 +1,6 @@
{ ... }: {
imports = [
./grafana.nix
./prometheus.nix
];
}

View file

@ -0,0 +1,24 @@
{ config, pkgs, ... }:
let
svcDomain = "grafana.${config.networking.domain}";
svcPort = config.services.grafana.settings.server.http_port;
in
{
services.caddy.virtualHosts."${svcDomain}".extraConfig = ''
reverse_proxy :${toString svcPort}
'';
services.grafana = {
enable = true;
settings = {
server = {
http_addr = "127.0.0.1";
http_port = 3001;
enforce_domain = true;
enable_gzip = true;
domain = svcDomain;
};
analytics.reporting_enabled = false; # NOTE: Disable Telemetry
};
};
}

View file

@ -0,0 +1,29 @@
{ config, pkgs, ... }:
#let
#svcDomain = "status.${config.networking.domain}";
#svcPort = config.services.prometheus.exporters.node.port;
#in
{
#services.caddy.virtualHosts."${svcDomain}".extraConfig = ''
#reverse_proxy :${svcPort}
#'';
services.prometheus = {
enable = true;
#globalConfig.scrape_interval = "10s"; # "1m"
#scrapeConfigs = [
#{
#job_name = "node";
#static_configs = [{
# targets = [ "localhost:${toString svcPort}" ];
#}];
#}
#];
};
#services.prometheus.exporters.node = {
#enable = true;
#port = 9000;
#enabledCollectors = [ "systemd" ];
#};
}