Modify service script

This commit is contained in:
2023-03-15 22:28:56 -04:00
parent 42560051d6
commit b9a925af8e

View File

@@ -3,28 +3,26 @@
inputs.handyhelper.url = "../";
outputs = { self, nixpkgs, handyhelper }: let
handy_overlay = (final: prev: {
handy_helper = handyhelper.packages."x86_64-linux".default;
});
system = "x86_64-linux";
handyhelper = handyhelper.packages.${system}.default;
in {
nixosConfigurations."staging" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
inherit system;
modules = [
../secrets/deploy.nix
({ config, pkgs, ... }: {
nixpkgs.overlays = [
handy_overlay
];
})
({lib, config, pkgs, ...}: {
({lib, config, pkgs, ...}: let
py = pkgs.python3.withPackages (p: with p; [
handyhelper
]);
in {
systemd.services.handyhelper = {
wantedBy = ["networking-online.target"];
enable = true;
path = [
pkgs.handy_helper
py
];
script = ''
${pkgs.handy_helper}/bin/handyhelper.py
python3 -m handyhelper
'';
};
})