mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 03:29:45 +01:00
ssh: add addKeysToAgent option
This commit is contained in:
parent
d9297efd3a
commit
7a69b3e738
5 changed files with 16 additions and 0 deletions
|
@ -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 {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
|
@ -528,6 +539,7 @@ in
|
|||
|
||||
Host *
|
||||
ForwardAgent ${lib.hm.booleans.yesNo cfg.forwardAgent}
|
||||
AddKeysToAgent ${cfg.addKeysToAgent}
|
||||
Compression ${lib.hm.booleans.yesNo cfg.compression}
|
||||
ServerAliveInterval ${toString cfg.serverAliveInterval}
|
||||
ServerAliveCountMax ${toString cfg.serverAliveCountMax}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
Host *
|
||||
ForwardAgent no
|
||||
AddKeysToAgent no
|
||||
Compression no
|
||||
ServerAliveInterval 0
|
||||
ServerAliveCountMax 3
|
||||
|
|
|
@ -5,6 +5,7 @@ Host dynamicBindPathNoPort
|
|||
|
||||
Host *
|
||||
ForwardAgent no
|
||||
AddKeysToAgent no
|
||||
Compression no
|
||||
ServerAliveInterval 0
|
||||
ServerAliveCountMax 3
|
||||
|
|
|
@ -18,6 +18,7 @@ Host ordered
|
|||
|
||||
Host *
|
||||
ForwardAgent no
|
||||
AddKeysToAgent no
|
||||
Compression no
|
||||
ServerAliveInterval 0
|
||||
ServerAliveCountMax 3
|
||||
|
|
|
@ -7,6 +7,7 @@ Match host xyz canonical
|
|||
|
||||
Host *
|
||||
ForwardAgent no
|
||||
AddKeysToAgent no
|
||||
Compression no
|
||||
ServerAliveInterval 0
|
||||
ServerAliveCountMax 3
|
||||
|
|
Loading…
Reference in a new issue