Modify service script
This commit is contained in:
@@ -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
|
||||
'';
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user