diff --git a/deploy/flake.nix b/deploy/flake.nix index 3d85f71..df2aa90 100644 --- a/deploy/flake.nix +++ b/deploy/flake.nix @@ -11,21 +11,6 @@ modules = [ ../secrets/deploy.nix ({lib, config, pkgs, ...}: let - 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"]; @@ -34,7 +19,13 @@ py ]; serviceConfig = { - ExecStart = handybot; + ExecStart = let + python = pkgs.python3.withPackages (p: with p; [ + handy_py + openai + ]); + in + "${python.interpreter} -m handyhelper"; }; }; })