grafana is non-https

This commit is contained in:
Motiejus Jakštys 2024-08-02 16:35:26 +03:00
parent c440ee3043
commit 97521d99ae

View File

@ -172,7 +172,6 @@
zones = { zones = {
"irc.jakstys.lt".accountKey = accountKey; "irc.jakstys.lt".accountKey = accountKey;
"hdd.jakstys.lt".accountKey = accountKey; "hdd.jakstys.lt".accountKey = accountKey;
"grafana.jakstys.lt".accountKey = accountKey;
"bitwarden.jakstys.lt".accountKey = accountKey; "bitwarden.jakstys.lt".accountKey = accountKey;
}; };
}; };
@ -242,11 +241,10 @@
abort @denied abort @denied
reverse_proxy 127.0.0.1:8123 reverse_proxy 127.0.0.1:8123
''; '';
"grafana.jakstys.lt".extraConfig = '' "grafana.jakstys.lt:80".extraConfig = ''
@denied not remote_ip ${myData.subnets.tailscale.cidr} @denied not remote_ip ${myData.subnets.tailscale.cidr}
abort @denied abort @denied
reverse_proxy 127.0.0.1:3000 reverse_proxy 127.0.0.1:3000
tls {$CREDENTIALS_DIRECTORY}/grafana.jakstys.lt-cert.pem {$CREDENTIALS_DIRECTORY}/grafana.jakstys.lt-key.pem
''; '';
"bitwarden.jakstys.lt".extraConfig = '' "bitwarden.jakstys.lt".extraConfig = ''
@denied not remote_ip ${myData.subnets.tailscale.cidr} @denied not remote_ip ${myData.subnets.tailscale.cidr}
@ -390,7 +388,7 @@
paths.logs = "/var/log/grafana"; paths.logs = "/var/log/grafana";
server = { server = {
domain = "grafana.jakstys.lt"; domain = "grafana.jakstys.lt";
root_url = "https://grafana.jakstys.lt"; root_url = "http://grafana.jakstys.lt";
enable_gzip = true; enable_gzip = true;
http_addr = "0.0.0.0"; http_addr = "0.0.0.0";
http_port = myData.ports.grafana; http_port = myData.ports.grafana;
@ -532,26 +530,21 @@
caddy = caddy =
let let
irc = config.mj.services.nsd-acme.zones."irc.jakstys.lt"; irc = config.mj.services.nsd-acme.zones."irc.jakstys.lt";
grafana = config.mj.services.nsd-acme.zones."grafana.jakstys.lt";
bitwarden = config.mj.services.nsd-acme.zones."bitwarden.jakstys.lt"; bitwarden = config.mj.services.nsd-acme.zones."bitwarden.jakstys.lt";
in in
{ {
serviceConfig.LoadCredential = [ serviceConfig.LoadCredential = [
"irc.jakstys.lt-cert.pem:${irc.certFile}" "irc.jakstys.lt-cert.pem:${irc.certFile}"
"irc.jakstys.lt-key.pem:${irc.keyFile}" "irc.jakstys.lt-key.pem:${irc.keyFile}"
"grafana.jakstys.lt-cert.pem:${grafana.certFile}"
"grafana.jakstys.lt-key.pem:${grafana.keyFile}"
"bitwarden.jakstys.lt-cert.pem:${bitwarden.certFile}" "bitwarden.jakstys.lt-cert.pem:${bitwarden.certFile}"
"bitwarden.jakstys.lt-key.pem:${bitwarden.keyFile}" "bitwarden.jakstys.lt-key.pem:${bitwarden.keyFile}"
]; ];
after = [ after = [
"nsd-acme-irc.jakstys.lt.service" "nsd-acme-irc.jakstys.lt.service"
"nsd-acme-grafana.jakstys.lt.service"
"nsd-acme-bitwarden.jakstys.lt.service" "nsd-acme-bitwarden.jakstys.lt.service"
]; ];
requires = [ requires = [
"nsd-acme-irc.jakstys.lt.service" "nsd-acme-irc.jakstys.lt.service"
"nsd-acme-grafana.jakstys.lt.service"
"nsd-acme-bitwarden.jakstys.lt.service" "nsd-acme-bitwarden.jakstys.lt.service"
]; ];
}; };
@ -632,7 +625,6 @@
pathConfig = { pathConfig = {
PathChanged = [ PathChanged = [
config.mj.services.nsd-acme.zones."irc.jakstys.lt".certFile config.mj.services.nsd-acme.zones."irc.jakstys.lt".certFile
config.mj.services.nsd-acme.zones."grafana.jakstys.lt".certFile
config.mj.services.nsd-acme.zones."bitwarden.jakstys.lt".certFile config.mj.services.nsd-acme.zones."bitwarden.jakstys.lt".certFile
]; ];
Unit = "cert-watcher.service"; Unit = "cert-watcher.service";