diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2023-06-05 19:47:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-05 19:47:10 +0200 |
commit | 048f16759573f9f643c6be967e1c0e3a23c32d31 (patch) | |
tree | 0f6a6a7bc3cced36f591b8c1b1f9f7f479e16142 /nixos/modules/services | |
parent | 05ba2c2a0112c9c3c7f6380975bd344248d5ce91 (diff) | |
parent | 37c95bc86883ef71af43dc8aeef3dad887d3b715 (diff) | |
download | nixlib-048f16759573f9f643c6be967e1c0e3a23c32d31.tar nixlib-048f16759573f9f643c6be967e1c0e3a23c32d31.tar.gz nixlib-048f16759573f9f643c6be967e1c0e3a23c32d31.tar.bz2 nixlib-048f16759573f9f643c6be967e1c0e3a23c32d31.tar.lz nixlib-048f16759573f9f643c6be967e1c0e3a23c32d31.tar.xz nixlib-048f16759573f9f643c6be967e1c0e3a23c32d31.tar.zst nixlib-048f16759573f9f643c6be967e1c0e3a23c32d31.zip |
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/modules/services')
-rw-r--r-- | nixos/modules/services/system/self-deploy.nix | 6 |
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 5f9ee06124cb..b5d8ea3f56e7 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}"; |