about summary refs log tree commit diff
path: root/modules/nixos/loki.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/nixos/loki.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/nixos/loki.nix b/modules/nixos/loki.nix
index c213832..49a9b19 100644
--- a/modules/nixos/loki.nix
+++ b/modules/nixos/loki.nix
@@ -55,8 +55,8 @@ in {
         common = rec {
           path_prefix = "/var/lib/loki";
           storage.filesystem = {
-            chunks_directory = "${path_prefix}/chunker";
-            rules_directory = "${path_prefix}/ruler";
+            chunks_directory = "${path_prefix}/chunks";
+            rules_directory = "${path_prefix}/rules";
           };
           replication_factor = 1;
           instance_interface_names = ["lo"];
@@ -79,6 +79,7 @@ in {
         limits_config = {
           max_streams_per_user = 0;
           max_global_streams_per_user = 0;
+          max_query_series = 100000; # Is this safe?
         };
 
         schema_config.configs = [
@@ -102,9 +103,10 @@ in {
       };
     };
 
-    systemd.tmpfiles.rules = [
-      "d /var/lib/loki 0700 loki loki - -"
-      "d /var/lib/loki/ruler 0700 loki loki - -"
+    systemd.tmpfiles.rules = with config.services.loki.configuration.common; [
+      "d ${path_prefix} 0700 loki loki - -"
+      "d ${storage.filesystem.chunks_directory} 0700 loki loki - -"
+      "d ${storage.filesystem.rules_directory} 0700 loki loki - -"
     ];
   };
 }

Consider giving Nix/NixOS a try! <3