diff --git a/modules/nix-ssh-agent.nix b/modules/nix-ssh-agent.nix index 94335c1..e1b080c 100644 --- a/modules/nix-ssh-agent.nix +++ b/modules/nix-ssh-agent.nix @@ -17,10 +17,10 @@ in { config = lib.mkIf (cfg.sock != null) { systemd.services.ssh-agent-nix-proxy = { wantedBy = [ "nix-daemon.service" ]; - before = [ "nix-daemon.service" ]; partOf = [ "nix-daemon.service" ]; serviceConfig = { - ExecStart = "${pkgs.socat}/bin/socat UNIX-LISTEN:/run/nix-ssh-agent,mode=770,group=nixbld,user=root,reuseaddr UNIX-CONNECT:${cfg.sock}"; + ExecStart = "${pkgs.socat}/bin/socat UNIX-LISTEN:/run/nix-ssh-agent,mode=770,group=nixbld,user=root,reuseaddr,fork UNIX-CONNECT:${cfg.sock}"; + Restart = "always"; }; };