Migration dogetipbot depuis blockio vers wallet intégré

This commit is contained in:
nyanloutre 2020-08-30 21:08:35 +02:00
parent 798c2ca66c
commit fbcf3bcac2
2 changed files with 9 additions and 15 deletions

View File

@ -1,9 +0,0 @@
self: super:
{
dogetipbot-telegram = super.callPackage (super.fetchgit {
url = "https://gitlab.com/nyanloutre/dogetipbot-telegram.git";
rev = "a63408de18d447983d65a51f176c35e434327517";
sha256 = "12y7yd114cz64blgnyljpnnqbycsp0f1ljzaiqq05a5xa4pjvwyf";
}) { pkgs = self; };
}

View File

@ -35,10 +35,6 @@ in
./web.nix ./web.nix
]; ];
nixpkgs.overlays = [
(import ../../overlays/dogetipbot-telegram.nix)
];
services = { services = {
fail2ban.enable = true; fail2ban.enable = true;
@ -242,14 +238,21 @@ in
}; };
}; };
systemd.services.dogetipbot-telegram = { systemd.services.dogetipbot-telegram = let
dogetipbot-telegram = pkgs.callPackage (pkgs.fetchgit {
url = "https://gitlab.com/nyanloutre/dogetipbot-telegram.git";
rev = "18c875a2e4b98221523818515a1eecb9c5aeb093";
sha256 = "0mhv00y1c2py425wxl13if6nlv97xk5k6flf772jj1yaxipjdmpn";
}) { inherit pkgs; };
in {
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
script = "${pkgs.dogetipbot-telegram}/bin/dogetipbot-telegram --block-io-api-key $BLOCK_IO_API_KEY --block-io-pin $BLOCK_IO_PIN --telegram-api-key $TELEGRAM_API_KEY --network DOGE"; script = "${dogetipbot-telegram}/bin/dogetipbot-telegram --db-path $STATE_DIRECTORY/users.db";
enable = true; enable = true;
serviceConfig = { serviceConfig = {
EnvironmentFile = "/mnt/secrets/dogetipbot-telegram_env"; EnvironmentFile = "/mnt/secrets/dogetipbot-telegram_env";
DynamicUser = true; DynamicUser = true;
StateDirectory = "dogetipbot";
}; };
}; };