Different ExecStart

This commit is contained in:
2023-03-15 22:45:20 -04:00
parent a16b75b53a
commit efd334b04b

View File

@@ -11,21 +11,6 @@
modules = [ modules = [
../secrets/deploy.nix ../secrets/deploy.nix
({lib, config, pkgs, ...}: let ({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 { in {
systemd.services.handyhelper = { systemd.services.handyhelper = {
wantedBy = ["networking-online.target"]; wantedBy = ["networking-online.target"];
@@ -34,7 +19,13 @@
py py
]; ];
serviceConfig = { serviceConfig = {
ExecStart = handybot; ExecStart = let
python = pkgs.python3.withPackages (p: with p; [
handy_py
openai
]);
in
"${python.interpreter} -m handyhelper";
}; };
}; };
}) })