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