1 { pkgs, lib, config, ... }:
3 inherit (config.users) users;
8 unixSocket = "/run/redis/redis.socket";
16 maxmemory-policy volatile-ttl
20 users.users.redis.group = "redis";
21 users.groups."redis" = {};
23 systemd.services.redis.serviceConfig = {
24 RuntimeDirectoryMode = "0750";
25 Group = users.redis.group;
28 # As suggested by redis in its logs
29 boot.kernel.sysctl."vm.overcommit_memory" = 1;
30 system.activationScripts.redis = ''
31 echo never >/sys/kernel/mm/transparent_hugepage/enabled