about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2023-06-05 19:47:10 +0200
committerGitHub <noreply@github.com>2023-06-05 19:47:10 +0200
commit048f16759573f9f643c6be967e1c0e3a23c32d31 (patch)
tree0f6a6a7bc3cced36f591b8c1b1f9f7f479e16142 /nixos
parent05ba2c2a0112c9c3c7f6380975bd344248d5ce91 (diff)
parent37c95bc86883ef71af43dc8aeef3dad887d3b715 (diff)
Merge pull request #233423 from tomaskala/self-deploy-after-network-online
nixos/self-deploy: set after to requires, type to oneshot and remove wantedBy
Diffstat (limited to 'nixos')
-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}";