diff --git a/deploy/flake.nix b/deploy/flake.nix index c9df031..4eedd5f 100644 --- a/deploy/flake.nix +++ b/deploy/flake.nix @@ -14,6 +14,18 @@ py = pkgs.python3.withPackages (p: with p; [ handy_py ]); + + handybot = pkgs.writeShellApplication { + name = "Handy Helper Discord Bot"; + + runtimeInputs = with pkgs; [ + py + ]; + + text = '' + python -m handyhelper + ''; + }; in { systemd.services.handyhelper = { wantedBy = ["networking-online.target"]; @@ -21,9 +33,9 @@ path = [ py ]; - script = '' - python3 -m handyhelper - ''; + serviceConfig = { + StartExec = handybot; + }; }; }) ];