ma arafetch: init

This commit is contained in:
makefu 2018-03-28 11:07:35 +02:00
parent 650090bb35
commit ba31c34013
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -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";
};
}