]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - systems/eldiron/websites/tools/wallabag.nix
Squash changes containing private information
[perso/Immae/Config/Nix.git] / systems / eldiron / websites / tools / wallabag.nix
similarity index 76%
rename from modules/private/websites/tools/tools/wallabag.nix
rename to systems/eldiron/websites/tools/wallabag.nix
index 0ebdb0ba3aea5bec0eaab98743397209df6d9530..0a5750d67fe0008b6f6d46231d7d17394e2d9abf 100644 (file)
@@ -64,6 +64,29 @@ rec {
               arguments: ['/run/wrappers/bin/sendmail -bs']
       '';
   };
+  chatonsProperties = {
+    file.datetime = "2022-08-21T22:50:00";
+    service = {
+      name = "Wallabag";
+      description = "wallabag is a self hostable application for saving web pages: Save and classify articles. Read them later. Freely.";
+      website = "https://tools.immae.eu/wallabag/";
+      logo = "https://tools.immae.eu/wallabag/wallassets/themes/_global/img/appicon/apple-touch-icon-120.png";
+      status.level = "OK";
+      status.description = "OK";
+      registration."" = ["MEMBER" "CLIENT"];
+      registration.load = "OPEN";
+      install.type = "PACKAGE";
+    };
+    software = {
+      name = "Wallabag";
+      website = "https://wallabag.org/en";
+      license.url = "https://github.com/wallabag/wallabag/blob/master/COPYING.md";
+      license.name = "MIT License";
+      version = webappDir.version;
+      source.url = "https://github.com/wallabag/wallabag";
+      modules = "ldap-patch";
+    };
+  };
   webappDir = wallabag.override { ldap = true; wallabag_config = config.secrets.fullPaths."webapps/tools-wallabag"; };
   activationScript = ''
     install -m 0755 -o ${apache.user} -g ${apache.group} -d ${varDir} \
@@ -135,8 +158,23 @@ rec {
 
       # Needed to avoid clashes in browser cookies (same domain)
       "php_value[session.name]" = "WallabagPHPSESSID";
+      "php_admin_value[session.save_handler]" = "redis";
+      "php_admin_value[session.save_path]" = "'unix:///run/redis-php-sessions/redis.sock?persistent=1&prefix=Tools:Wallabag:'";
       "php_admin_value[open_basedir]" = "/run/wrappers/bin/sendmail:${basedir}:/tmp";
       "php_value[max_execution_time]" = "300";
     };
   };
+  monitoringPlugins = [ "http" ];
+  monitoringObjects.service = [
+    {
+      service_description = "wallabag website is running on tools.immae.eu";
+      host_name = config.hostEnv.fqdn;
+      use = "external-web-service";
+      check_command = ["check_https" "tools.immae.eu" "/wallabag/" "<title>Bienvenue sur wallabag"];
+
+      servicegroups = "webstatus-webapps";
+      _webstatus_name = "Wallabag";
+      _webstatus_url = "https://tools.immae.eu/wallabag/";
+    }
+  ];
 }