]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - virtual/modules/websites/commons/stats.nix
Move all fixmes to mantisbt issue tracking
[perso/Immae/Config/Nix.git] / virtual / modules / websites / commons / stats.nix
index a7ade3b0336a67571c51aef273b876ccaf5ad1e0..b5bf0e04dc6658be784c11ebddbc6b20edfdc0ed 100644 (file)
@@ -6,8 +6,12 @@ in {
     services.myWebsites.commons.stats = {
       enable = lib.mkEnableOption "enable statistics";
       sites = lib.mkOption {
-        # FIXME: specify
-        type = lib.types.listOf (lib.types.unspecified);
+        type = lib.types.listOf (lib.types.submodule {
+          options = {
+            conf = lib.mkOption { type = lib.types.path; };
+            name = lib.mkOption { type = lib.types.string; };
+          };
+        });
         default = [];
         description = "Sites to generate stats";
       };
@@ -51,13 +55,10 @@ in {
             goaccess $TMPFILE --no-progress -o /var/lib/goaccess/${domain}/index.html -p ${conf}
             '';
           in "${d}/bin/stats-${domain}";
-      # FIXME: running several goaccess simultaneously seems to be
-      # bugged?
       in
         pkgs.lib.lists.imap0 (i: v: "${toString (i+5)} 0 * * * root ${stats v.name v.conf}") cfg.sites;
     };
 
-    # FIXME: initial sync
     system.activationScripts.goaccess = ''
       mkdir -p /var/lib/goaccess
     '' +