Different ExecStart
This commit is contained in:
@@ -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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user