enable redlib blahg blah

This commit is contained in:
Sakooooo 2025-01-05 14:06:30 +04:00
parent 7e5f0f1043
commit 2bcbda0dd0
Signed by: sako
GPG key ID: FE52FD65B76E4751
3 changed files with 35 additions and 1 deletions

View file

@ -80,6 +80,7 @@
woodpecker.enable = true; woodpecker.enable = true;
}; };
headscale.enable = true; headscale.enable = true;
redlib.enable = true;
local = { nextcloud.enable = false; }; local = { nextcloud.enable = false; };
}; };
fedi = { akkoma.enable = true; }; fedi = { akkoma.enable = true; };

View file

@ -1 +1 @@
{ imports = [ ./forgejo ./headscale.nix ./local ./sakosite.nix ]; } { imports = [ ./forgejo ./headscale.nix ./local ./sakosite.nix ./redlib.nix ]; }

View file

@ -0,0 +1,33 @@
{ 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";
port = "8284";
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";
locations."/" = { proxyPass = "http://localhost:8284";- };
};
};
};
}