s 2 muell_caller: fix derivation

This commit is contained in:
makefu 2017-06-01 10:13:14 +02:00
parent bb4c3d978a
commit 1c1314f667
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -7,12 +7,12 @@ let
src = pkgs.fetchgit { src = pkgs.fetchgit {
url = "https://github.com/shackspace/muell_caller/"; url = "https://github.com/shackspace/muell_caller/";
rev = "bbd4009"; rev = "bbd4009";
sha256 = "06xaa1j6sfyvvdxg0366fcslhn478anqh4m5hljyf0z29knvz7pg"; sha256 = "1bfnfl2vdh0p5wzyz5p48qh04vvsg2445avg86fzhzragx25fqv0";
}; };
buildInputs = [ buildInputs = [
(pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [
docopt docopt
requests requests2
paramiko paramiko
python python
])) ]))
@ -23,12 +23,12 @@ let
}; };
cfg = "${toString <secrets>}/tell.json"; cfg = "${toString <secrets>}/tell.json";
in { in {
systemd.services.mqtt_sub = { systemd.services.call_muell = {
description = "call muell"; description = "call muell";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
User = "nobody"; # TODO separate user User = "nobody"; # TODO separate user
ExecStartPre = writeDash "call-muell-pre" '' ExecStartPre = pkgs.writeDash "call-muell-pre" ''
cp ${cfg} /tmp/tell.json cp ${cfg} /tmp/tell.json
chown nobody /tmp/tell.json chown nobody /tmp/tell.json
''; '';