Co-Authored-By: edef <edef@edef.eu> Co-Authored-by: Ryan Lahfa <raito@lix.systems> Change-Id: Ica1cda177a236814de900f50a8a61d288f58f519
25 lines
476 B
Nix
25 lines
476 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
imports = [
|
|
./base.nix
|
|
];
|
|
|
|
config = {
|
|
services.nginx =
|
|
let
|
|
scfg = config.services.grafana.settings.server;
|
|
in
|
|
{
|
|
enable = true;
|
|
virtualHosts."${scfg.domain}" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
locations."/" = {
|
|
proxyPass = "http://${scfg.http_addr}:${toString scfg.http_port}";
|
|
proxyWebsockets = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|