Matomo

From NixOS Wiki

Matomo (source code) is a real-time web analytics platform.

This article extends the documentation in the NixOS manual.

Plugins

To use plugins one can use matomo2nix

matomoPackages = (callPackage (builtins.fetchGit {
  url = "https://git.helsinki.tools/helsinki-systems/matomo2nix";
  ref = "master";
}) {}) // {
  withPlugins = matomoPkg: pluginPkgs: runCommand "matomo-with-plugins" {} ''
    cp -a ${matomoPkg}/. $out
    find $out -type d -exec chmod 755 {} +
    for i in ${lib.concatStringsSep " " pluginPkgs}; do
      cp -a $i/. $out
    done
  '';
};