35 lines
1,000 B
Nix
35 lines
1,000 B
Nix
{ ... }:
|
|
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:
|