From b9a925af8e4e57ab5b5701e928f56a2317f68820 Mon Sep 17 00:00:00 2001 From: "DavidCrompton1192@gmail.com" Date: Wed, 15 Mar 2023 22:28:56 -0400 Subject: [PATCH] Modify service script --- deploy/flake.nix | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/deploy/flake.nix b/deploy/flake.nix index b27e88a..cb5bc99 100644 --- a/deploy/flake.nix +++ b/deploy/flake.nix @@ -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 ''; }; })