24 lines
484 B
Nix
24 lines
484 B
Nix
|
{ config, pkgs, lib, ... }:
|
||
|
let
|
||
|
cfg = config.services.vm_redis;
|
||
|
in
|
||
|
{
|
||
|
options.services.vm_redis = {
|
||
|
enable = lib.mkEnableOption "Enable minimal config";
|
||
|
};
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
services.redis = {
|
||
|
vmOverCommit = true;
|
||
|
servers.redis = {
|
||
|
enable = true;
|
||
|
port = 6379;
|
||
|
bind = "0.0.0.0";
|
||
|
settings = {
|
||
|
protected-mode = "no";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
networking.firewall.allowedTCPPorts = [ 6379 ];
|
||
|
};
|
||
|
}
|