Matomo: Difference between revisions

imported>Nix
m add Software/Applications subcategory
Lennart (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[https://matomo.org Matomo] is a real-time web analytics platform.
[https://matomo.org Matomo] ([https://github.com/matomo-org source code]) is a real-time web analytics platform.
 
This article extends the documentation in the [https://nixos.org/manual/nixos/stable/#module-services-matomo NixOS manual].


== Plugins ==
== Plugins ==


To use plugins one can use [https://git.helsinki.tools/helsinki-systems/matomo2nix matomo2nix]
To use plugins one can use [https://git.helsinki.tools/helsinki-systems/matomo4nix matomo4nix].
 
<syntaxhighlight lang="nix" line="1">{ pkgs, lib, ...}:
let
 
  matomoPackages = (pkgs.callPackage (builtins.fetchGit {
    url = "https://git.helsinki.tools/helsinki-systems/matomo4nix";
    ref = "master";
  }) {}) // {
    withPlugins = matomoPkg: pluginPkgs: pkgs.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
    '';
  };
 
in {
 
  services.matomo = {
    enable = true;
    hostname = "TODO";
    package = matomoPackages.withPlugins pkgs.matomo (
      with matomoPackages.plugins;
      [
        RebelOIDC
      ]
    );
  };


<syntaxHighlight lang=nix>
}</syntaxhighlight>
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
  '';
};
</syntaxHighlight>


[[Category:Applications]]
[[Category:Web Applications]]
[[Category:Server]]
[[Category:NixOS Manual]]