summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/stats/arafetch.nix
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-04-10 18:17:58 +0200
committerjeschli <jeschli@gmail.com>2018-04-10 18:17:58 +0200
commitab7b04f55e9eb331e5f9ed254843ed8e0bcf9d78 (patch)
tree3c5811972b7fb1c58dbcdc3ac5f52a6bcf9f492b /makefu/2configs/stats/arafetch.nix
parent3f9cbbc8d1f5420ef276633f087e63f700c386e7 (diff)
parent5b8c4d24e274bbf26e85420fc11b5bf7e24ac22d (diff)
Merge branch 'master' of prism.r:stockholm
Diffstat (limited to 'makefu/2configs/stats/arafetch.nix')
-rw-r--r--makefu/2configs/stats/arafetch.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/makefu/2configs/stats/arafetch.nix b/makefu/2configs/stats/arafetch.nix
new file mode 100644
index 000000000..e04b12f9c
--- /dev/null
+++ b/makefu/2configs/stats/arafetch.nix
@@ -0,0 +1,36 @@
+{ pkgs, lib, ...}:
+with import <stockholm/lib>;
+let
+ pkg = with pkgs.python3Packages;buildPythonPackage rec {
+ rev = "762d747";
+ name = "europastats-${rev}";
+ propagatedBuildInputs = [
+ requests
+ docopt
+ influxdb
+ beautifulsoup4
+ ];
+ src = pkgs.fetchgit {
+ url = "http://cgit.euer.krebsco.de/arafetch";
+ inherit rev;
+ sha256 = "164xiqbrr914lz0nh3i1dxz8iwg6vm2af3i3803cd3242nznw0ws";
+ };
+ };
+ home = "/var/lib/arafetch";
+in {
+ users.users.arafetch = {
+ uid = genid "arafetch";
+ inherit home;
+ createHome = true;
+ };
+
+ systemd.services.arafetch = {
+ startAt = "Mon 09:15:00";
+ wantedBy = [ "multi-user.target" ];
+ environment = {
+ OUTDIR = home;
+ };
+ path = [ pkg pkgs.git pkgs.wget ];
+ script = "${pkg}/bin/weekrun";
+ };
+}