goaccess $TMPFILE --no-progress -o /var/lib/goaccess/${domain}/index.html -p ${conf}
'';
in "${d}/bin/stats-${domain}";
+ allStats = sites: pkgs.writeScript "stats" ''
+ #!${pkgs.stdenv.shell}
+
+ ${builtins.concatStringsSep "\n" (map (v: stats v.name v.conf) sites)}
+ '';
in
- pkgs.lib.lists.imap0 (i: v: "${toString (i+5)} 0 * * * root ${stats v.name v.conf}") cfg.sites;
+ [
+ "5 0 * * * root ${allStats cfg.sites}"
+ ];
};
system.activationScripts.goaccess = ''