From efd334b04beeada5bc15a594d2e8ee3178667844 Mon Sep 17 00:00:00 2001 From: "DavidCrompton1192@gmail.com" Date: Wed, 15 Mar 2023 22:45:20 -0400 Subject: [PATCH] Different ExecStart --- deploy/flake.nix | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) 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"; }; }; })