Merge pull request #233423 from tomaskala/self-deploy-after-network-online
nixos/self-deploy: set after to requires, type to oneshot and remove wantedBy
This commit is contained in:
commit
048f167595
1 changed files with 4 additions and 2 deletions
|
@ -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}";
|
||||
|
||||
|
|
Loading…
Reference in a new issue