nixos-infra/services/redis/service.nix
Rustam Efimov 30ce0dafc2
Some checks failed
Nix CI / build (push) Failing after 31s
initial commit
2026-04-01 08:50:01 +03:00

28 lines
392 B
Nix

{
config,
lib,
sec,
...
}:
let
inherit (config.machine.redis)
port
enable
;
in
with lib; mkIf enable {
sops.secrets = {
"redis/password" = { };
};
networking.firewall = {
allowedTCPPorts = [ port ];
};
services.redis.servers."default" = {
inherit enable;
inherit port;
bind = null;
requirePassFile = sec."redis/password".path;
};
}