lib: add mkCaddyReverseProxy, mkFail2banJail, mkGrafanaAnnotationService, extractArrApiKey
This commit is contained in:
@@ -12,6 +12,11 @@
|
||||
(lib.serviceFilePerms "grafana" [
|
||||
"Z ${service_configs.grafana.dir} 0700 grafana grafana"
|
||||
])
|
||||
(lib.mkCaddyReverseProxy {
|
||||
domain = service_configs.grafana.domain;
|
||||
port = service_configs.ports.private.grafana.port;
|
||||
auth = true;
|
||||
})
|
||||
];
|
||||
|
||||
services.grafana = {
|
||||
@@ -85,11 +90,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."${service_configs.grafana.domain}".extraConfig = ''
|
||||
import ${config.age.secrets.caddy_auth.path}
|
||||
reverse_proxy :${toString service_configs.ports.private.grafana.port}
|
||||
'';
|
||||
|
||||
services.postgresql = {
|
||||
ensureDatabases = [ "grafana" ];
|
||||
ensureUsers = [
|
||||
|
||||
Reference in New Issue
Block a user