about summary refs log tree commit diff
path: root/nixos/modules/services/system/self-deploy.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/system/self-deploy.nix')
-rw-r--r--nixos/modules/services/system/self-deploy.nix6
1 files changed, 4 insertions, 2 deletions
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}";