about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-02-03 04:19:48 +0900
committersefidel <contact@sefidel.net>2024-02-03 04:19:48 +0900
commitf637236c51b03c91d77997b898b0fa5e605020d2 (patch)
treec2480a029d8c6b0e270e6c391bf7c97f5447f68d /modules
parent18a770ba6cdbfdfe7c1508b0af68243c606ea51c (diff)
downloadnixrc-f637236c51b03c91d77997b898b0fa5e605020d2.tar.gz
nixrc-f637236c51b03c91d77997b898b0fa5e605020d2.zip
feat(nixos/kanata): switch to new modules
Diffstat (limited to 'modules')
-rw-r--r--modules/services/blocky/default.nix26
1 files changed, 1 insertions, 25 deletions
diff --git a/modules/services/blocky/default.nix b/modules/services/blocky/default.nix
index 5afa4a8..81c517e 100644
--- a/modules/services/blocky/default.nix
+++ b/modules/services/blocky/default.nix
@@ -32,11 +32,6 @@ in
           ips = [ "9.9.9.9" "149.112.112.112" ];
         };
 
-        customDNS.mapping = {
-          "metrics.internal" = "100.93.1.1"; # kanata
-          "nextcloud.internal" = "100.93.1.1"; # kanata
-        };
-
         caching = {
           minTime = "0m";
           maxTime = "12h";
@@ -68,8 +63,6 @@ in
 
     services.prometheus = {
       enable = true;
-      listenAddress = "127.0.0.1";
-      port = 9000;
       globalConfig.scrape_interval = "15s";
       globalConfig.evaluation_interval = "15s";
       scrapeConfigs = [{
@@ -79,14 +72,7 @@ in
     };
 
     services.grafana = {
-      enable = true;
       settings = {
-        analytics.reporting_enabled = false;
-        server = {
-          domain = "127.0.0.1:3000";
-          http_addr = "127.0.0.1";
-          enable_gzip = true;
-        };
         # Required for blocky panel
         panels.disable_sanitize_html = true;
       };
@@ -99,7 +85,7 @@ in
             access = "proxy";
             orgId = 1;
             uid = "5Z0Y8D3GXAMDODSF";
-            url = "http://127.0.0.1:9000";
+            url = "http://127.0.0.1:${toString config.services.prometheus.port}";
             isDefault = true;
             jsonData = {
               graphiteVersion = "1.1";
@@ -116,16 +102,6 @@ in
       };
     };
 
-    services.nginx.virtualHosts."metrics.internal" = {
-      locations."/" = {
-        proxyPass = "http://localhost:3000";
-        proxyWebsockets = true;
-        extraConfig = ''
-          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-        '';
-      };
-    };
-
     environment.etc."grafana-dashboards/blocky_rev3.json" = {
       source = ./grafana_blocky_rev3.json;
       group = "grafana";