mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 13:57:10 +03:00
ssh service: add sftpFlags option
This commit is contained in:
parent
a796d692c4
commit
dc08dcf6e7
@ -103,6 +103,15 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sftpFlags = mkOption {
|
||||||
|
type = with types; listOf str;
|
||||||
|
default = [];
|
||||||
|
example = [ "-f AUTHPRIV" "-l INFO" ];
|
||||||
|
description = ''
|
||||||
|
Commandline flags to add to sftp-server.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
permitRootLogin = mkOption {
|
permitRootLogin = mkOption {
|
||||||
default = "prohibit-password";
|
default = "prohibit-password";
|
||||||
type = types.enum ["yes" "without-password" "prohibit-password" "forced-commands-only" "no"];
|
type = types.enum ["yes" "without-password" "prohibit-password" "forced-commands-only" "no"];
|
||||||
@ -208,7 +217,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
moduliFile = mkOption {
|
moduliFile = mkOption {
|
||||||
example = "services.openssh.moduliFile = /etc/my-local-ssh-moduli;";
|
example = "/etc/my-local-ssh-moduli;";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = ''
|
description = ''
|
||||||
Path to <literal>moduli</literal> file to install in
|
Path to <literal>moduli</literal> file to install in
|
||||||
@ -338,7 +347,7 @@ in
|
|||||||
''}
|
''}
|
||||||
|
|
||||||
${optionalString cfg.allowSFTP ''
|
${optionalString cfg.allowSFTP ''
|
||||||
Subsystem sftp ${cfgc.package}/libexec/sftp-server
|
Subsystem sftp ${cfgc.package}/libexec/sftp-server ${concatStringsSep " " cfg.sftpFlags}
|
||||||
''}
|
''}
|
||||||
|
|
||||||
PermitRootLogin ${cfg.permitRootLogin}
|
PermitRootLogin ${cfg.permitRootLogin}
|
||||||
|
Loading…
Reference in New Issue
Block a user