{ config, lib, ... }: let cfg = import ./vars.nix; name = "calibre"; #dbport = cfg.XXX.dbport; #db_host = cfg.podman.hostIP; port = cfg.calibre.port; domain = cfg.calibre.domain; in { imports = [ #./podman.nix #./podman-postgresql.nix # for the database ./nginx.nix # for the webserver ]; #sops.secrets."${name}/db" = {}; #sops.secrets."${name}/env" = {}; #services.podman-postgresql."${name}" = { # enable = true; # image = "docker.io/library/postgres:16-alpine"; # port = (lib.strings.toInt dbport); # passwordFile = config.sops.secrets."${name}/db".path; #}; virtualisation.oci-containers.containers.${name} = { image = "lscr.io/linuxserver/calibre-web"; environment = { TZ = "Europe/Berlin"; DOCKER_MODS = "linuxserver/mods:universal-calibre"; }; #environmentFiles = [ config.sops.secrets."${name}/env".path ]; ports = [ "${port}:${port}" ]; volumes = [ "/var/lib/calibre:/config" "/mnt/mergerfs/media/books:/books" ]; extraOptions = cfg.podman.extraOptions; }; #services.nginx.virtualHosts.${domain} = { # forceSSL = true; # enableACME = true; # locations."/" = { # proxyPass = "http://localhost:${port}"; # proxyWebsockets = true; # }; # 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: