configuration.nix/hosts/rico1/services/apps/loki/default.nix
2024-10-27 23:56:51 +05:30

24 lines
550 B
Nix

_:
let
inherit (import ../../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
domainName = "loki.labs.adtya.xyz";
in
{
services = {
caddy = {
virtualHosts."${domainName}" = {
inherit logFormat;
extraConfig = ''
${tlsAcmeDnsChallenge}
reverse_proxy 127.0.0.1:3100
'';
};
};
loki = {
enable = true;
dataDir = "/mnt/data/loki";
configFile = ./loki-config.yaml;
};
};
systemd.services.loki.unitConfig.RequiresMountsFor = [ "/mnt/data" ];
}