]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - systems/eldiron/websites/tools/ttrss.nix
Squash changes containing private information
[perso/Immae/Config/Nix.git] / systems / eldiron / websites / tools / ttrss.nix
similarity index 72%
rename from modules/private/websites/tools/tools/ttrss.nix
rename to systems/eldiron/websites/tools/ttrss.nix
index 1dc99ed0446bd9491c1248e866d191b526316d86..639325631d43c16954e5304adb924c553675f311 100644 (file)
@@ -13,13 +13,36 @@ rec {
         ${varDir}/cache/simplepie/ \
         ${varDir}/cache/upload/
       touch ${varDir}/feed-icons/index.html
-      install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions
     '';
   };
+  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 = ''
       <?php
 
@@ -57,6 +80,7 @@ rec {
         define('LOG_DESTINATION', ''');
         define('CONFIG_VERSION', 26);
 
+        define('DAEMON_UPDATE_LOGIN_LIMIT', 0);
 
         define('SPHINX_SERVER', 'localhost:9312');
         define('SPHINX_INDEX', 'ttrss, delta');
@@ -123,7 +147,21 @@ rec {
       # 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_path]" = "${varDir}/phpSessions";
+      "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/" "<title>Tiny Tiny RSS"];
+
+      servicegroups = "webstatus-webapps";
+      _webstatus_name = "TT-RSS";
+      _webstatus_url = "https://tools.immae.eu/ttrss/";
+    }
+  ];
 }