From 710a6c4de4c8949b8f46e224872d16f0db0ecd62 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Sat, 15 Jul 2023 18:28:37 +0200 Subject: [PATCH] grafana and change matrix domain --- hosts/chmura/conduit.nix | 2 +- hosts/chmura/default.nix | 1 + hosts/chmura/grafana.nix | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 hosts/chmura/grafana.nix diff --git a/hosts/chmura/conduit.nix b/hosts/chmura/conduit.nix index 4337ba4..542947d 100644 --- a/hosts/chmura/conduit.nix +++ b/hosts/chmura/conduit.nix @@ -19,7 +19,7 @@ services.caddy = { enable = true; - virtualHosts."matrix.jacekpoz.pl".extraConfig = '' + virtualHosts."m.jacekpoz.pl".extraConfig = '' reverse_proxy /_matrix/* localhost:6167 ''; virtualHosts."jacekpoz.pl:8448".extraConfig = '' diff --git a/hosts/chmura/default.nix b/hosts/chmura/default.nix index 1be161c..2ae076e 100644 --- a/hosts/chmura/default.nix +++ b/hosts/chmura/default.nix @@ -2,6 +2,7 @@ _: { imports = [ ./conduit.nix ./configuration.nix + ./grafana.nix ./hardware-configuration.nix ]; } diff --git a/hosts/chmura/grafana.nix b/hosts/chmura/grafana.nix new file mode 100644 index 0000000..85dd97f --- /dev/null +++ b/hosts/chmura/grafana.nix @@ -0,0 +1,26 @@ +{ + config, + pkgs, + inputs, + ... +}: { + services.grafana = { + enable = true; + settings.server = { + http_addr = "127.0.0.1"; + http_port = 3000; + domain = "jacekpoz.pl"; + root_url = "https://d.jacekpoz.pl"; + }; + }; + + services.caddy = { + enable = true; + virtualHosts."d.jacekpoz.pl".extraConfig = '' + reverse_proxy * localhost:3000 + ''; + }; + + networking.firewall.allowedTCPPorts = [ 3000 ]; + networking.firewall.allowedUDPPorts = [ 3000 ]; +}