redis
This commit is contained in:
parent
c06994c7d2
commit
5e50dd3a9e
|
@ -2,7 +2,7 @@
|
|||
with lib;
|
||||
let cfg = config.void.server;
|
||||
in {
|
||||
imports = [ ./dns ./nginx.nix ./services ./postgresql.nix ];
|
||||
imports = [ ./dns ./nginx.nix ./services ./postgresql.nix ./redis.nix ];
|
||||
|
||||
options.void.server = { isServer = mkEnableOption false; };
|
||||
|
||||
|
|
27
modules/server/redis.nix
Normal file
27
modules/server/redis.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.void.server.redis;
|
||||
srv = config.void.server;
|
||||
in {
|
||||
options.void.server.redis = { enable = mkEnableOption false; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Thank you NotAShelf (again lmao)
|
||||
services.redis = {
|
||||
enable = true;
|
||||
vmOverCommit = true;
|
||||
servers = mkIf srv.services.forgejo.enable {
|
||||
forgejo = {
|
||||
enable = true;
|
||||
user = "forgejo";
|
||||
port = 6371;
|
||||
databases = 16;
|
||||
logLevel = "debug";
|
||||
requirePass = "forgejo";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in a new issue