{ config, lib, ... }: with lib; mkIf (elem "tt-rss" config.machine.services) ({ services.tt-rss = let fqdn = ((findFirst (s: s.service == "tt-rss") { domain = null; } config.machine.vHosts)).domain; in { enable = true; registration.enable = false; selfUrlPath = "https://${fqdn}"; virtualHost = fqdn; database = { type = "mysql"; }; }; })