diff options
-rw-r--r-- | nixops/eldiron.nix | 7 | ||||
-rw-r--r-- | nixops/modules/websites/commons/stats.nix | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/nixops/eldiron.nix b/nixops/eldiron.nix index 718d483..d62f022 100644 --- a/nixops/eldiron.nix +++ b/nixops/eldiron.nix | |||
@@ -83,13 +83,16 @@ | |||
83 | }; | 83 | }; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | environment.systemPackages = [ | 86 | users.users.root.packages = [ |
87 | pkgs.telnet | 87 | pkgs.telnet |
88 | pkgs.htop | 88 | pkgs.htop |
89 | pkgs.vim | ||
90 | pkgs.iftop | 89 | pkgs.iftop |
91 | ]; | 90 | ]; |
92 | 91 | ||
92 | environment.systemPackages = [ | ||
93 | pkgs.vim | ||
94 | ]; | ||
95 | |||
93 | services.cron = { | 96 | services.cron = { |
94 | enable = true; | 97 | enable = true; |
95 | systemCronJobs = [ | 98 | systemCronJobs = [ |
diff --git a/nixops/modules/websites/commons/stats.nix b/nixops/modules/websites/commons/stats.nix index c707303..88559b1 100644 --- a/nixops/modules/websites/commons/stats.nix +++ b/nixops/modules/websites/commons/stats.nix | |||
@@ -19,7 +19,7 @@ in { | |||
19 | }; | 19 | }; |
20 | 20 | ||
21 | config = lib.mkIf cfg.enable { | 21 | config = lib.mkIf cfg.enable { |
22 | environment.systemPackages = [ | 22 | users.users.root.packages = [ |
23 | pkgs.goaccess | 23 | pkgs.goaccess |
24 | ]; | 24 | ]; |
25 | 25 | ||
@@ -39,7 +39,7 @@ in { | |||
39 | for i in /var/log/httpd/access_log-${domain}*.gz; do | 39 | for i in /var/log/httpd/access_log-${domain}*.gz; do |
40 | zcat "$i" | sed -n "/\\[$date_regex/ p" >> $TMPFILE | 40 | zcat "$i" | sed -n "/\\[$date_regex/ p" >> $TMPFILE |
41 | done | 41 | done |
42 | goaccess $TMPFILE --no-progress -o /var/lib/goaccess/${domain}/index.html -p ${conf} | 42 | ${pkgs.goaccess}/bin/goaccess $TMPFILE --no-progress -o /var/lib/goaccess/${domain}/index.html -p ${conf} |
43 | ''; | 43 | ''; |
44 | in "${d}/bin/stats-${domain}"; | 44 | in "${d}/bin/stats-${domain}"; |
45 | allStats = sites: pkgs.writeScript "stats" '' | 45 | allStats = sites: pkgs.writeScript "stats" '' |