nixos/modules/server/services/redlib.nix

34 lines
975 B
Nix
Raw Normal View History

2025-01-05 14:06:30 +04:00
{ config, lib, ... }:
with lib;
let cfg = config.void.server.services.redlib;
in {
options.void.server.services.redlib = { enable = mkEnableOption false; };
config = mkIf cfg.enable {
# TODO Maybe make this a public instance? idk
services = {
redlib = {
enable = true;
address = "127.0.0.1";
2025-01-05 14:07:22 +04:00
port = 8284;
2025-01-05 14:06:30 +04:00
settings = {
REDLIB_DEFAULT_WIDE = "on";
REDLIB_DEFAULT_USE_HLS = "on";
REDLIB_DEFAULT_THEME = "black";
# Never goon
REDLIB_SFW_ONLY = "on";
REDLIB_ROBOTS_DISABLE_INDEXING = "on";
REDLIB_BANNER = "welcome to sako.lol's redlib or whatever";
};
};
nginx.virtualHosts."redlib.sako.box" = {
forceSSL = true;
sslCertificate = "/srv/secrets/certs/sako.box.pem";
sslCertificateKey = "/srv/secrets/certs/sako.box-key.pem";
2025-01-05 14:06:54 +04:00
locations."/" = { proxyPass = "http://localhost:8284"; };
2025-01-05 14:06:30 +04:00
};
};
};
}