Fix Nix SSH agent forwarding service

This commit is contained in:
notgne2 2022-12-27 03:09:03 -07:00
parent fa1a81c7f4
commit 2ee77196ba
Signed by: notgne2
SSH Key Fingerprint: SHA256:qlFCAimT/PvNIG3u+aYT9pIqFCWgu6sNsWjpV1vHLIE

View File

@ -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";
};
};