This commit is contained in:
commit
30ce0dafc2
195 changed files with 8902 additions and 0 deletions
28
services/redis/service.nix
Normal file
28
services/redis/service.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
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;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue