diff --git a/hosts/rico2/services/frpc.nix b/hosts/rico2/services/frpc.nix index d457cae..dc60c59 100644 --- a/hosts/rico2/services/frpc.nix +++ b/hosts/rico2/services/frpc.nix @@ -4,12 +4,15 @@ in { systemd.services.frpc = { enable = true; description = "FRP Client"; - wantedBy = ["multi-user.target"]; + after = ["network.target"]; requires = ["network.target"]; - path = [ - pkgs.frp - ]; - script = "frpc -c /etc/frp/frpc.ini"; + wantedBy = ["multi-user.target"]; + serviceConfig = { + Type="simple"; + ExecStart="${pkgs.frp}/bin/frpc -c /etc/frp/frpc.ini"; + Restart="always"; + RestartSec="5s"; + }; }; environment.etc."frp/frpc.ini".text = '' [common]