This commit is contained in:
Sakooooo 2025-01-01 14:29:01 +04:00
parent c06994c7d2
commit 5e50dd3a9e
Signed by: sako
GPG key ID: 3FD715D87D7725E0
2 changed files with 28 additions and 1 deletions

View file

@ -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
View 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";
};
};
};
};
}