{ config, pkgs, inputs, lib, ... }: let port = 8080; domain = "news.cyplo.dev"; in { imports = [ ../nginx.nix ]; services.nginx = { virtualHosts = { "${domain}" = { forceSSL = true; enableACME = true; locations."/" = { proxyPass = "http://127.0.0.1:" + toString port; }; }; }; }; containers.rss = { autoStart = true; forwardPorts = [{ containerPort = port; hostPort = port; }]; config = { config, pkgs, ... }: let inherit (config.services.tt-rss) pool; inherit (config.services.tt-rss) root; in { system.stateVersion = "22.05"; services.tt-rss = { enable = true; selfUrlPath = "https://${domain}"; virtualHost = null; registration.enable = false; }; services.nginx = { enable = true; virtualHosts = { "${domain}" = { listen = [{ inherit port; addr = "0.0.0.0"; }]; root = "${root}/www"; locations."/" = { index = "index.php"; }; locations."^~ /feed-icons" = { root = "${root}"; }; locations."~ \\.php$" = { extraConfig = '' fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:${ config.services.phpfpm.pools.${pool}.socket }; fastcgi_index index.php; ''; }; }; }; }; }; }; }