36 lines
930 B
Nix
36 lines
930 B
Nix
{
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
inputs.handyhelper.url = "../";
|
|
|
|
outputs = { self, nixpkgs, handyhelper }: let
|
|
system = "x86_64-linux";
|
|
handy_py = handyhelper.packages.${system}.default;
|
|
in {
|
|
nixosConfigurations."staging" = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
modules = [
|
|
../secrets/deploy.nix
|
|
({lib, config, pkgs, ...}: let
|
|
in {
|
|
systemd.services.handyhelper = {
|
|
wantedBy = ["networking-online.target"];
|
|
enable = true;
|
|
path = [
|
|
py
|
|
];
|
|
serviceConfig = {
|
|
ExecStart = let
|
|
python = pkgs.python3.withPackages (p: with p; [
|
|
handy_py
|
|
openai
|
|
]);
|
|
in
|
|
"${python.interpreter} -m handyhelper";
|
|
};
|
|
};
|
|
})
|
|
];
|
|
};
|
|
};
|
|
}
|