mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
ssh: add a few more options
This commit is contained in:
parent
a93445f3fe
commit
b8b595c6b2
1 changed files with 49 additions and 0 deletions
|
@ -81,6 +81,12 @@ let
|
|||
"Set timeout in seconds after which response will be requested.";
|
||||
};
|
||||
|
||||
compression = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Specifies whether to use compression.";
|
||||
};
|
||||
|
||||
checkHostIP = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
|
@ -117,6 +123,7 @@ let
|
|||
++ optional (cf.hostname != null) " HostName ${cf.hostname}"
|
||||
++ optional (cf.serverAliveInterval != 0)
|
||||
" ServerAliveInterval ${toString cf.serverAliveInterval}"
|
||||
++ optional cf.compression " Compression yes"
|
||||
++ optional (!cf.checkHostIP) " CheckHostIP no"
|
||||
++ optional (cf.proxyCommand != null) " ProxyCommand ${cf.proxyCommand}"
|
||||
++ mapAttrsToList (n: v: " ${n} ${v}") cf.extraOptions
|
||||
|
@ -139,6 +146,44 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
compression = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = "Specifies whether to use compression.";
|
||||
};
|
||||
|
||||
serverAliveInterval = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
description = ''
|
||||
Set default timeout in seconds after which response will be requested.
|
||||
'';
|
||||
};
|
||||
|
||||
hashKnownHosts = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Indicates that
|
||||
<citerefentry>
|
||||
<refentrytitle>ssh</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</citerefentry>
|
||||
should hash host names and addresses when they are added to
|
||||
the known hosts file.
|
||||
'';
|
||||
};
|
||||
|
||||
userKnownHostsFile = mkOption {
|
||||
type = types.str;
|
||||
default = "~/.ssh/known_hosts";
|
||||
description = ''
|
||||
Specifies one or more files to use for the user host key
|
||||
database, separated by whitespace. The default is
|
||||
<filename>~/.ssh/known_hosts</filename>.
|
||||
'';
|
||||
};
|
||||
|
||||
controlMaster = mkOption {
|
||||
default = "no";
|
||||
type = types.enum ["yes" "no" "ask" "auto" "autoask"];
|
||||
|
@ -201,6 +246,10 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
home.file.".ssh/config".text = ''
|
||||
ForwardAgent ${yn cfg.forwardAgent}
|
||||
Compression ${yn cfg.compression}
|
||||
ServerAliveInterval ${toString cfg.serverAliveInterval}
|
||||
HashKnownHosts ${yn cfg.hashKnownHosts}
|
||||
UserKnownHostsFile ${cfg.userKnownHostsFile}
|
||||
ControlMaster ${cfg.controlMaster}
|
||||
ControlPath ${cfg.controlPath}
|
||||
ControlPersist ${cfg.controlPersist}
|
||||
|
|
Loading…
Reference in a new issue