configuration.nix/hosts/rico0/services/apps/loki.nix

24 lines
509 B
Nix
Raw Normal View History

2024-09-14 19:55:57 +05:30
_:
let
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
domainName = "loki.labs.adtyz.xyz";
in
{
2024-07-21 14:19:08 +05:30
services = {
caddy = {
2024-09-14 19:55:57 +05:30
virtualHosts."${domainName}" = {
logFormat = logFormat domainName;
2024-07-21 14:19:08 +05:30
extraConfig = ''
reverse_proxy 127.0.0.1:3100
'';
};
};
loki = {
enable = true;
dataDir = "/mnt/data/loki";
2024-07-27 17:33:39 +05:30
configFile = ./loki-config.yaml;
2024-07-21 14:19:08 +05:30
};
};
systemd.services.loki.unitConfig.RequiresMountsFor = [ "/mnt/data" ];
}