Co-Authored-By: edef <edef@edef.eu> Co-Authored-by: Ryan Lahfa <raito@lix.systems> Change-Id: Ica1cda177a236814de900f50a8a61d288f58f519
24 lines
531 B
Nix
24 lines
531 B
Nix
{ config, ... }:
|
|
let
|
|
mimirPort = config.services.mimir.configuration.server.http_listen_port;
|
|
in
|
|
{
|
|
imports = [
|
|
./base.nix
|
|
];
|
|
services.nginx = {
|
|
upstreams.mimir = {
|
|
servers."127.0.0.1:${toString mimirPort}" = { };
|
|
extraConfig = "keepalive 16;";
|
|
};
|
|
|
|
virtualHosts."mimir.snix.dev" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
locations."/api/v1/push" = {
|
|
proxyPass = "http://mimir";
|
|
basicAuthFile = config.age.secrets.metrics-push-htpasswd.path;
|
|
};
|
|
};
|
|
};
|
|
}
|