1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-09-21 05:47:29 +02:00

ssh: add addKeysToAgent option

This commit is contained in:
Jan Schmitt 2022-12-15 21:46:07 +01:00 committed by Mikilio
parent 2025495826
commit 6a3e98c2f8
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F
5 changed files with 16 additions and 0 deletions

View file

@ -361,6 +361,17 @@ in
''; '';
}; };
addKeysToAgent = mkOption {
type = types.str;
default = "no";
description = ''
When enabled, a private key that is used during authentication will be
added to ssh-agent if it is running (with confirmation enabled if
set to 'confirm'). The argument must be 'no' (the default), 'yes', 'confirm'
(optionally followed by a time interval), 'ask' or a time interval (e.g. '1h').
'';
};
compression = mkOption { compression = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
@ -528,6 +539,7 @@ in
Host * Host *
ForwardAgent ${lib.hm.booleans.yesNo cfg.forwardAgent} ForwardAgent ${lib.hm.booleans.yesNo cfg.forwardAgent}
AddKeysToAgent ${cfg.addKeysToAgent}
Compression ${lib.hm.booleans.yesNo cfg.compression} Compression ${lib.hm.booleans.yesNo cfg.compression}
ServerAliveInterval ${toString cfg.serverAliveInterval} ServerAliveInterval ${toString cfg.serverAliveInterval}
ServerAliveCountMax ${toString cfg.serverAliveCountMax} ServerAliveCountMax ${toString cfg.serverAliveCountMax}

View file

@ -2,6 +2,7 @@
Host * Host *
ForwardAgent no ForwardAgent no
AddKeysToAgent no
Compression no Compression no
ServerAliveInterval 0 ServerAliveInterval 0
ServerAliveCountMax 3 ServerAliveCountMax 3

View file

@ -5,6 +5,7 @@ Host dynamicBindPathNoPort
Host * Host *
ForwardAgent no ForwardAgent no
AddKeysToAgent no
Compression no Compression no
ServerAliveInterval 0 ServerAliveInterval 0
ServerAliveCountMax 3 ServerAliveCountMax 3

View file

@ -18,6 +18,7 @@ Host ordered
Host * Host *
ForwardAgent no ForwardAgent no
AddKeysToAgent no
Compression no Compression no
ServerAliveInterval 0 ServerAliveInterval 0
ServerAliveCountMax 3 ServerAliveCountMax 3

View file

@ -7,6 +7,7 @@ Match host xyz canonical
Host * Host *
ForwardAgent no ForwardAgent no
AddKeysToAgent no
Compression no Compression no
ServerAliveInterval 0 ServerAliveInterval 0
ServerAliveCountMax 3 ServerAliveCountMax 3