nixos-hypervisor/services/redis/default.nix
Théo Barnouin 781ce2d5e9
All checks were successful
/ Build Nix targets (push) Successful in 3m36s
Format using alejandra
2025-01-23 14:13:19 +01:00

26 lines
488 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];
};
}