]> Git — Sourcephile - sourcephile-nix.git/blob - machines/mermet/redis.nix
nix: fix /etc/ld-nix.so.preload sharing
[sourcephile-nix.git] / machines / mermet / redis.nix
1 { pkgs, lib, config, ... }:
2 let
3 inherit (config.users) users;
4 in
5 {
6 services.redis = {
7 enable = true;
8 unixSocket = "/run/redis/redis.socket";
9 databases = 16;
10 syslog = true;
11 extraConfig = ''
12 bind 127.0.0.1 ::1
13 unixsocketperm 660
14 maxclients 1024
15 maxmemory 500mb
16 maxmemory-policy volatile-ttl
17 '';
18 };
19
20 users.users.redis.group = "redis";
21 users.groups."redis" = {};
22
23 systemd.services.redis.serviceConfig = {
24 RuntimeDirectoryMode = "0750";
25 Group = users.redis.group;
26 };
27 }