aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-05 10:30:30 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-05 10:30:30 +0200
commitee5c6141b0505df33036c91276ab13b0b5baa4c2 (patch)
treeceb2b5acec9c1631daf8842d9c91b58f890beca2
parent70dbb716ea6b7e02c8a13cf14be41319c592a30d (diff)
downloadNix-ee5c6141b0505df33036c91276ab13b0b5baa4c2.tar.gz
Nix-ee5c6141b0505df33036c91276ab13b0b5baa4c2.tar.zst
Nix-ee5c6141b0505df33036c91276ab13b0b5baa4c2.zip
Move unneeded system packages to a better place
-rw-r--r--nixops/eldiron.nix7
-rw-r--r--nixops/modules/websites/commons/stats.nix4
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" ''