nixos/modules/server/redis.nix

28 lines
615 B
Nix
Raw Normal View History

2025-01-01 14:29:01 +04:00
{ 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";
};
};
};
};
}