Add other services
This commit is contained in:
parent
0bbb49efee
commit
ff8a4d23a9
10 changed files with 377 additions and 7 deletions
23
services/redis/default.nix
Normal file
23
services/redis/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ 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 ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue