ma google-muell: use new version, update hard-coded ip
This commit is contained in:
parent
9af31259b8
commit
25d6a582e5
|
@ -5,7 +5,10 @@ let
|
||||||
home = "/var/lib/ampel";
|
home = "/var/lib/ampel";
|
||||||
sec = "${toString <secrets>}/google-muell.json";
|
sec = "${toString <secrets>}/google-muell.json";
|
||||||
ampelsec = "${home}/google-muell.json";
|
ampelsec = "${home}/google-muell.json";
|
||||||
esp = "192.168.1.23";
|
cred = "${toString <secrets>}/google-muell-creds.json";
|
||||||
|
# TODO: generate this credential file locally
|
||||||
|
ampelcred = "${home}/google-muell-creds.json";
|
||||||
|
esp = "192.168.8.204";
|
||||||
sleepval = "1800";
|
sleepval = "1800";
|
||||||
in {
|
in {
|
||||||
users.users.ampel = {
|
users.users.ampel = {
|
||||||
|
@ -21,10 +24,10 @@ in {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "ampel";
|
User = "ampel";
|
||||||
ExecStartPre = pkgs.writeDash "copy-ampel-secrets" ''
|
ExecStartPre = pkgs.writeDash "copy-ampel-secrets" ''
|
||||||
cp ${sec} ${ampelsec}
|
install -m600 -o ampel ${sec} ${ampelsec}
|
||||||
chown ampel ${ampelsec}
|
install -m600 -o ampel ${cred} ${ampelcred}
|
||||||
'';
|
'';
|
||||||
ExecStart = "${pkg}/bin/google-muell --esp=${esp} --client-secrets=${ampelsec} --credential-path=${home}/google-muell-creds.json --sleepval=${sleepval}";
|
ExecStart = "${pkg}/bin/google-muell --esp=${esp} --client-secrets=${ampelsec} --credential-path=${ampelcred} --sleepval=${sleepval}";
|
||||||
PermissionsStartOnly = true;
|
PermissionsStartOnly = true;
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 10;
|
RestartSec = 10;
|
||||||
|
|
Loading…
Reference in a new issue