diff options
author | Tomas Kala <tomas.kala@blindspot.ai> | 2023-05-22 15:00:08 +0200 |
---|---|---|
committer | Tomas Kala <tomas.kala@blindspot.ai> | 2023-05-24 14:05:17 +0200 |
commit | 37c95bc86883ef71af43dc8aeef3dad887d3b715 (patch) | |
tree | a054f3881c77e0b144606a6b8692e2c034672ff3 /nixos/modules/services | |
parent | 8c8b03ba9e463e4bc8e15bda2f43761df63af5de (diff) | |
download | nixlib-37c95bc86883ef71af43dc8aeef3dad887d3b715.tar nixlib-37c95bc86883ef71af43dc8aeef3dad887d3b715.tar.gz nixlib-37c95bc86883ef71af43dc8aeef3dad887d3b715.tar.bz2 nixlib-37c95bc86883ef71af43dc8aeef3dad887d3b715.tar.lz nixlib-37c95bc86883ef71af43dc8aeef3dad887d3b715.tar.xz nixlib-37c95bc86883ef71af43dc8aeef3dad887d3b715.tar.zst nixlib-37c95bc86883ef71af43dc8aeef3dad887d3b715.zip |
nixos/self-deploy: set after to requires, type to
... oneshot, 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}"; |