diff --git a/modules/libremdb.nix b/modules/libremdb.nix new file mode 100644 index 0000000..3af09c3 --- /dev/null +++ b/modules/libremdb.nix @@ -0,0 +1,35 @@ +{ ... }: +let + cfg = import ./vars.nix; + domain = cfg.libremdb.domain; + port = cfg.libremdb.port; +in +{ + virtualisation.oci-containers.containers.libremdb = { + image = "quay.io/pussthecatorg/libremdb"; + environment = { + TZ = "Europe/Berlin"; + NEXT_TELEMETRY_DISABLED = "1"; + NEXT_PUBLIC_URL = "https://${domain}"; + AXIOS_USERAGENT = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0"; + AXIOS_ACCEPT = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"; + }; + ports = [ + "127.0.0.1:${port}:3000" + ]; + extraOptions = cfg.podman.extraOptions; + }; + + services.nginx.virtualHosts."${domain}" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:${port}"; + }; + extraConfig = '' + access_log /var/log/nginx/${domain}_access.log; + error_log /var/log/nginx/${domain}_error.log; + ''; + }; +} +# vim: set et ts=2 sw=2 ai: diff --git a/modules/vars.nix b/modules/vars.nix index 9af24a0..86d000c 100644 --- a/modules/vars.nix +++ b/modules/vars.nix @@ -53,6 +53,11 @@ port = "8096"; }; + libremdb = { + domain = "imdb.mc-fucker.cool"; + port = "3030"; + }; + lldap = { domain = "user.mc-fucker.cool"; webPort = "17170";