aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/mo/monitoring/components/loki.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-07-19 16:38:43 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-07-19 16:38:43 +0200
commitabaa76a8523e6e81e2c30bb073d3200d0283b15b (patch)
tree680880d342e052e305a581f0f04a26e2eb58715d /modules/by-name/mo/monitoring/components/loki.nix
parentmodules/monitoring/grafana: Put behind anubis (diff)
downloadnixos-server-abaa76a8523e6e81e2c30bb073d3200d0283b15b.zip
modules/monitoring/: Hard-code all the {u,g}ids
Diffstat (limited to 'modules/by-name/mo/monitoring/components/loki.nix')
-rw-r--r--modules/by-name/mo/monitoring/components/loki.nix32
1 files changed, 31 insertions, 1 deletions
diff --git a/modules/by-name/mo/monitoring/components/loki.nix b/modules/by-name/mo/monitoring/components/loki.nix
index 9a285c5..30d32b3 100644
--- a/modules/by-name/mo/monitoring/components/loki.nix
+++ b/modules/by-name/mo/monitoring/components/loki.nix
@@ -17,6 +17,37 @@ in {
};
config = lib.mkIf cfg.enable {
+ users = {
+ groups = {
+ fluent-bit = {
+ gid = config.vhack.constants.ids.gids.fluent-bit;
+ };
+ loki = {
+ gid = config.vhack.constants.ids.gids.loki;
+ };
+ };
+ users = {
+ fluent-bit = {
+ isSystemUser = true;
+ group = "fluent-bit";
+ uid = config.vhack.constants.ids.uids.fluent-bit;
+ };
+ loki = {
+ isSystemUser = true;
+ group = "loki";
+ uid = config.vhack.constants.ids.uids.loki;
+ };
+ };
+ };
+
+ # I decided to switch to fluent-bit because it can be tested locally https://docs.fluentbit.io/manual/local-testing/logging-pipeline
+ systemd.services.fluent-bit = {
+ serviceConfig = {
+ User = "fluent-bit";
+ Group = "fluent-bit";
+ DynamicUser = lib.mkForce false;
+ };
+ };
services = {
loki = {
enable = true;
@@ -60,7 +91,6 @@ in {
};
};
- # I decided to switch to fluent-bit because it can be tested locally https://docs.fluentbit.io/manual/local-testing/logging-pipeline
fluent-bit = {
enable = true;
settings = {