From 37c95bc86883ef71af43dc8aeef3dad887d3b715 Mon Sep 17 00:00:00 2001 From: Tomas Kala Date: Mon, 22 May 2023 15:00:08 +0200 Subject: nixos/self-deploy: set after to requires, type to ... oneshot, remove wantedBy --- nixos/modules/services/system/self-deploy.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/services/system/self-deploy.nix b/nixos/modules/services/system/self-deploy.nix index 5f9ee06124cb4..b5d8ea3f56e79 100644 --- a/nixos/modules/services/system/self-deploy.nix +++ b/nixos/modules/services/system/self-deploy.nix @@ -125,13 +125,15 @@ in }; config = lib.mkIf cfg.enable { - systemd.services.self-deploy = { + systemd.services.self-deploy = rec { inherit (cfg) startAt; - wantedBy = [ "multi-user.target" ]; + serviceConfig.Type = "oneshot"; requires = lib.mkIf (!(isPathType cfg.repository)) [ "network-online.target" ]; + after = requires; + environment.GIT_SSH_COMMAND = lib.mkIf (cfg.sshKeyFile != null) "${pkgs.openssh}/bin/ssh -i ${lib.escapeShellArg cfg.sshKeyFile}"; -- cgit 1.4.1