diff options
author | lassulus <lassulus@lassul.us> | 2018-03-29 11:17:55 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-03-29 11:17:55 +0200 |
commit | 1589a668023312ad6d0a24abb4caefe76ea95bac (patch) | |
tree | 5165721158e632af1b2a8081e0be52cae944f429 /makefu/2configs/stats/arafetch.nix | |
parent | 22f33b8e99cf9ffe575905370df736ddc3517338 (diff) | |
parent | 10bcf2db927692818a948c755fdfbf961a2ac3d7 (diff) |
Merge remote-tracking branch 'gum/master' into staging/18.03
Diffstat (limited to 'makefu/2configs/stats/arafetch.nix')
-rw-r--r-- | makefu/2configs/stats/arafetch.nix | 36 |
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"; + }; +} |