From 8d094021e6829c7a22905411d7f8c98ada2fb780 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Sat, 21 Mar 2026 12:50:57 +0100 Subject: [PATCH] Try to triage Valkey --- nix-system-configs/modules/system/database.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nix-system-configs/modules/system/database.nix b/nix-system-configs/modules/system/database.nix index 579325a..2cae876 100644 --- a/nix-system-configs/modules/system/database.nix +++ b/nix-system-configs/modules/system/database.nix @@ -129,7 +129,7 @@ in { Restart = "always"; User = "root"; RuntimeDirectory = "valkey_6379"; # places runtime dir under /run - # Keep logs in a file (configured below) but also keep unit re-start behavior + Type = "notify"; # valkey can notify systemd when ready if supervised systemd is enabled in config }; }; @@ -549,7 +549,7 @@ in { # The default is "no". To run under upstart/systemd, you can simply uncomment # the line below: # - # supervised auto + supervised systemd # If a pid file is specified, the server writes it where specified at startup # and removes it at exit. @@ -2826,6 +2826,11 @@ in { "f /var/log/valkey_6379.log 0644 root root - -" ]; + # Ensure kernel allows memory overcommit so Valkey / jemalloc background saves won't fail. + boot.sysctl = { + "vm.overcommit_memory" = 1; + }; + system.stateVersion = "25.11"; }; }