nixos-config/config/services/grafana.nix

23 lines
440 B
Nix

{
lib,
config,
pkgs,
...
}: {
services.grafana = {
enable = true;
domain = "grafana.int.chir.rs";
port = 2342;
addr = "127.0.0.1";
};
services.caddy.virtualHosts.${config.services.grafana.domain} = {
useACMEHost = "int.chir.rs";
logFormat = pkgs.lib.mkForce "";
extraConfig = ''
import baseConfig
reverse_proxy http://127.0.0.1:${toString config.services.grafana.port}
'';
};
}