home/ssh: use %C for control socket paths
This commit is contained in:
parent
a0b2f9da99
commit
2287685c2c
1 changed files with 3 additions and 2 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
controlSocket = "~/.ssh/controlmasters/%r@%n:%p.sock";
|
controlSocket = "~/.ssh/controlmasters/%C.sock";
|
||||||
|
|
||||||
proxyTagType = types.submodule (
|
proxyTagType = types.submodule (
|
||||||
{ name, ... }:
|
{ name, ... }:
|
||||||
|
|
@ -93,10 +93,11 @@ in
|
||||||
tag: tagDef:
|
tag: tagDef:
|
||||||
let
|
let
|
||||||
dependency = if tagDef.after != null then lib.hm.dag.entryAfter tagDef.after else lib.id;
|
dependency = if tagDef.after != null then lib.hm.dag.entryAfter tagDef.after else lib.id;
|
||||||
|
escapeOpensshConfig = builtins.replaceStrings ["%"] ["%%"];
|
||||||
in
|
in
|
||||||
lib.nameValuePair "tagged-${tag}" {
|
lib.nameValuePair "tagged-${tag}" {
|
||||||
match = ''tagged="${tag}"'';
|
match = ''tagged="${tag}"'';
|
||||||
proxyCommand = "${lib.getExe pkgs.fc-scripts.ssh-multi-proxy} -v -p connect --control-path='${controlSocket}'${lib.optionalString tagDef.noDirect " -n"} -i ${lib.concatStringsSep "," tagDef.connectType}${
|
proxyCommand = "${lib.getExe pkgs.fc-scripts.ssh-multi-proxy} -v -S ${config.programs.ssh.package}/bin/ssh -p connect${lib.optionalString tagDef.noDirect " -n"} --control-path='${escapeOpensshConfig controlSocket}' -i ${lib.concatStringsSep "," tagDef.connectType}${
|
||||||
lib.optionalString (tagDef.jumpHost != null) " -j ${tagDef.jumpHost}"
|
lib.optionalString (tagDef.jumpHost != null) " -j ${tagDef.jumpHost}"
|
||||||
} %h %p";
|
} %h %p";
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue