diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-21 21:06:33 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-21 21:06:33 +0100 |
commit | a5365ec3d924a91abdd80c4f58d2158472788de9 (patch) | |
tree | fbcda39758dc703f0c73fd1e7b224e4675c61edb /virtual/modules/websites/commons | |
parent | 7fff3ab2628284e7f53bee04401621f4c0963b4f (diff) | |
download | Nix-a5365ec3d924a91abdd80c4f58d2158472788de9.tar.gz Nix-a5365ec3d924a91abdd80c4f58d2158472788de9.tar.zst Nix-a5365ec3d924a91abdd80c4f58d2158472788de9.zip |
Move all fixmes to mantisbt issue tracking
Fixes https://git.immae.eu/mantisbt/view.php?id=111
Diffstat (limited to 'virtual/modules/websites/commons')
-rw-r--r-- | virtual/modules/websites/commons/stats.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/virtual/modules/websites/commons/stats.nix b/virtual/modules/websites/commons/stats.nix index a7ade3b..b5bf0e0 100644 --- a/virtual/modules/websites/commons/stats.nix +++ b/virtual/modules/websites/commons/stats.nix | |||
@@ -6,8 +6,12 @@ in { | |||
6 | services.myWebsites.commons.stats = { | 6 | services.myWebsites.commons.stats = { |
7 | enable = lib.mkEnableOption "enable statistics"; | 7 | enable = lib.mkEnableOption "enable statistics"; |
8 | sites = lib.mkOption { | 8 | sites = lib.mkOption { |
9 | # FIXME: specify | 9 | type = lib.types.listOf (lib.types.submodule { |
10 | type = lib.types.listOf (lib.types.unspecified); | 10 | options = { |
11 | conf = lib.mkOption { type = lib.types.path; }; | ||
12 | name = lib.mkOption { type = lib.types.string; }; | ||
13 | }; | ||
14 | }); | ||
11 | default = []; | 15 | default = []; |
12 | description = "Sites to generate stats"; | 16 | description = "Sites to generate stats"; |
13 | }; | 17 | }; |
@@ -51,13 +55,10 @@ in { | |||
51 | goaccess $TMPFILE --no-progress -o /var/lib/goaccess/${domain}/index.html -p ${conf} | 55 | goaccess $TMPFILE --no-progress -o /var/lib/goaccess/${domain}/index.html -p ${conf} |
52 | ''; | 56 | ''; |
53 | in "${d}/bin/stats-${domain}"; | 57 | in "${d}/bin/stats-${domain}"; |
54 | # FIXME: running several goaccess simultaneously seems to be | ||
55 | # bugged? | ||
56 | in | 58 | in |
57 | pkgs.lib.lists.imap0 (i: v: "${toString (i+5)} 0 * * * root ${stats v.name v.conf}") cfg.sites; | 59 | pkgs.lib.lists.imap0 (i: v: "${toString (i+5)} 0 * * * root ${stats v.name v.conf}") cfg.sites; |
58 | }; | 60 | }; |
59 | 61 | ||
60 | # FIXME: initial sync | ||
61 | system.activationScripts.goaccess = '' | 62 | system.activationScripts.goaccess = '' |
62 | mkdir -p /var/lib/goaccess | 63 | mkdir -p /var/lib/goaccess |
63 | '' + | 64 | '' + |