nixos/cloudflared: systemd dependency fix
- also wait for network-online.target: fixes startup error on reboot without functioning networking - restart on-failure (upstream service definition)
This commit is contained in:
parent
d62198f2d4
commit
7e159b1a67
1 changed files with 3 additions and 2 deletions
|
@ -302,13 +302,14 @@ in
|
|||
mkConfigFile = pkgs.writeText "cloudflared.yml" (builtins.toJSON fullConfig);
|
||||
in
|
||||
nameValuePair "cloudflared-tunnel-${name}" ({
|
||||
after = [ "network.target" ];
|
||||
after = [ "network.target" "network-online.target" ];
|
||||
wants = [ "network.target" "network-online.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
ExecStart = "${cfg.package}/bin/cloudflared tunnel --config=${mkConfigFile} --no-autoupdate run";
|
||||
Restart = "always";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
})
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue