diff --git a/hosts/sakoserver/configuration.nix b/hosts/sakoserver/configuration.nix index 13d82561..98a581a0 100644 --- a/hosts/sakoserver/configuration.nix +++ b/hosts/sakoserver/configuration.nix @@ -80,6 +80,7 @@ woodpecker.enable = true; }; headscale.enable = true; + redlib.enable = true; local = { nextcloud.enable = false; }; }; fedi = { akkoma.enable = true; }; diff --git a/modules/server/services/default.nix b/modules/server/services/default.nix index 4a85347e..ec1a9cfb 100644 --- a/modules/server/services/default.nix +++ b/modules/server/services/default.nix @@ -1 +1 @@ -{ imports = [ ./forgejo ./headscale.nix ./local ./sakosite.nix ]; } +{ imports = [ ./forgejo ./headscale.nix ./local ./sakosite.nix ./redlib.nix ]; } diff --git a/modules/server/services/redlib.nix b/modules/server/services/redlib.nix new file mode 100644 index 00000000..0711724f --- /dev/null +++ b/modules/server/services/redlib.nix @@ -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";- }; + }; + }; + + }; +}