Skip to content

Commit 4040c57

Browse files
authored
modules/programs/ssh: support identityAgent (#6783)
1 parent 760eed5 commit 4040c57

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

modules/programs/ssh.nix

+17
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,22 @@ let
167167
'';
168168
};
169169

170+
identityAgent = mkOption {
171+
type = with types; either (listOf str) (nullOr str);
172+
default = [ ];
173+
apply =
174+
p:
175+
if p == null then
176+
[ ]
177+
else if lib.isString p then
178+
[ p ]
179+
else
180+
p;
181+
description = ''
182+
Specifies the location of the ssh identity agent.
183+
'';
184+
};
185+
170186
user = mkOption {
171187
type = types.nullOr types.str;
172188
default = null;
@@ -362,6 +378,7 @@ let
362378
++ optional (cf.proxyCommand != null) " ProxyCommand ${cf.proxyCommand}"
363379
++ optional (cf.proxyJump != null) " ProxyJump ${cf.proxyJump}"
364380
++ map (file: " IdentityFile ${file}") cf.identityFile
381+
++ map (file: " IdentityAgent ${file}") cf.identityAgent
365382
++ map (file: " CertificateFile ${file}") cf.certificateFile
366383
++ map (f: " LocalForward" + addressPort f.bind + addressPort f.host) cf.localForwards
367384
++ map (f: " RemoteForward" + addressPort f.bind + addressPort f.host) cf.remoteForwards

0 commit comments

Comments
 (0)