{ php, env, ttrss, ttrss-plugins, config }: rec { varDir = "/var/lib/ttrss"; activationScript = { deps = [ "wrappers" ]; text = '' install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir} \ ${varDir}/lock ${varDir}/cache ${varDir}/feed-icons install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir}/cache/export/ \ ${varDir}/cache/feeds/ \ ${varDir}/cache/images/ \ ${varDir}/cache/js/ \ ${varDir}/cache/simplepie/ \ ${varDir}/cache/upload/ touch ${varDir}/feed-icons/index.html ''; }; chatonsProperties = { file.datetime = "2022-08-21T22:50:00"; service = { name = "RSS"; description = "Tiny Tiny RSS is a free and open source web-based news feed (RSS/Atom) reader and aggregator"; website = "https://tools.immae.eu/ttrss/"; logo = "https://tools.immae.eu/ttrss/images/favicon.png"; status.level = "OK"; status.description = "OK"; registration."" = ["MEMBER" "CLIENT"]; registration.load = "OPEN"; install.type = "PACKAGE"; }; software = { name = "Tiny Tiny RSS"; website = "https://tt-rss.org/"; license.url = "https://www.gnu.org/copyleft/gpl.html"; license.name = "GNU General Public License Version 3"; version = webRoot.version; source.url = "https://git.tt-rss.org/fox/tt-rss.git/"; modules = map (p: p.pluginName) webRoot.plugins; }; }; keys."webapps/tools-ttrss" = { user = apache.user; group = apache.group; permissions = "0400"; keyDependencies = [ php ]; text = '' DirectoryIndex index.php SetHandler "proxy:unix:${socket}|fcgi://localhost" AllowOverride All Options FollowSymlinks Require all granted ''; }; phpFpm = rec { serviceDeps = [ "postgresql.service" "openldap.service" ]; basedir = builtins.concatStringsSep ":" ( [ webRoot config.secrets.fullPaths."webapps/tools-ttrss" varDir ] ++ webRoot.plugins); pool = { "listen.owner" = apache.user; "listen.group" = apache.group; "pm" = "ondemand"; "pm.max_children" = "60"; "pm.process_idle_timeout" = "60"; # Needed to avoid clashes in browser cookies (same domain) "php_value[session.name]" = "TtrssPHPSESSID"; "php_admin_value[open_basedir]" = "${basedir}:/tmp"; "php_admin_value[session.save_handler]" = "redis"; "php_admin_value[session.save_path]" = "'unix:///run/redis-php-sessions/redis.sock?persistent=1&prefix=Tools:TTRSS:'"; }; }; monitoringPlugins = [ "http" ]; monitoringObjects.service = [ { service_description = "ttrss website is running on tools.immae.eu"; host_name = config.hostEnv.fqdn; use = "external-web-service"; check_command = ["check_https" "tools.immae.eu" "/ttrss/" "Tiny Tiny RSS"]; servicegroups = "webstatus-webapps"; _webstatus_name = "TT-RSS"; _webstatus_url = "https://tools.immae.eu/ttrss/"; } ]; }