configuration.nix/hosts/rico1/services/apps/loki/default.nix

25 lines
550 B
Nix
Raw Normal View History

2024-10-27 18:36:30 +05:30
_:
let
2024-10-27 23:09:50 +05:30
inherit (import ../../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
2024-10-27 18:36:30 +05:30
domainName = "loki.labs.adtya.xyz";
in
{
services = {
caddy = {
virtualHosts."${domainName}" = {
2024-10-27 23:09:50 +05:30
inherit logFormat;
2024-10-27 18:36:30 +05:30
extraConfig = ''
2024-10-27 23:09:50 +05:30
${tlsAcmeDnsChallenge}
2024-10-27 18:36:30 +05:30
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" ];
}