-{ lib, config, pkgs, myconfig, ... }:
+{ lib, config, pkgs, ... }:
let
cfg = config.myServices.databases.redis;
in {
'';
};
# Output variables
- systemdRuntimeDirectory = lib.mkOption {
- type = lib.types.str;
- # Use ReadWritePaths= instead if socketsDir is outside of /run
- default = assert lib.strings.hasPrefix "/run/" cfg.socketsDir;
- lib.strings.removePrefix "/run/" cfg.socketsDir;
- description = ''
- Adjusted redis sockets directory for systemd
- '';
- readOnly = true;
- };
sockets = lib.mkOption {
type = lib.types.attrsOf lib.types.path;
default = {
maxclients 1024
'';
};
- systemd.services.redis.serviceConfig.RuntimeDirectory = cfg.systemdRuntimeDirectory;
services.spiped = {
enable = true;
WorkerThreads 1
Authority {
- Auth "${myconfig.env.databases.redis.predixy.read}" {
+ Auth "${config.myEnv.databases.redis.predixy.read}" {
Mode read
}
}
Databases 16
RefreshMethod fixed
Group shard001 {
- + ${myconfig.env.databases.redis.socket}
+ + ${config.myEnv.databases.redis.socket}
}
}
'';
user = "spiped";
group = "spiped";
permissions = "0400";
- text = myconfig.env.databases.redis.spiped_key;
+ text = config.myEnv.databases.redis.spiped_key;
}
];