roles/logserver.nix: add initial config for loki and prometheus

This commit is contained in:
2025-07-06 15:35:56 -07:00
parent 94debbce6a
commit 02447cc7b5

View File

@@ -8,5 +8,19 @@ let cfg = config.logserver;
in {
options.logserver = { enable = mkEnableOption "Enables logserver role"; };
config = mkIf cfg.enable { };
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ loki prometheus ];
# Config is generated using Ansible
services.loki = {
enable = true;
configFile = /etc/loki/loki.yaml;
};
# Config is generated declaratively
services.prometheus = { };
enable = true;
enableReload = true;
checkConfig = "syntax-only";
};
}