From dc08dcf6e7d8f93de6d0987a0e0afa40266e7f07 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 18 Sep 2017 21:43:16 +0200 Subject: [PATCH] ssh service: add sftpFlags option --- nixos/modules/services/networking/ssh/sshd.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix index 0f58536b4b73..8828429a8178 100644 --- a/nixos/modules/services/networking/ssh/sshd.nix +++ b/nixos/modules/services/networking/ssh/sshd.nix @@ -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 { default = "prohibit-password"; type = types.enum ["yes" "without-password" "prohibit-password" "forced-commands-only" "no"]; @@ -208,7 +217,7 @@ in }; moduliFile = mkOption { - example = "services.openssh.moduliFile = /etc/my-local-ssh-moduli;"; + example = "/etc/my-local-ssh-moduli;"; type = types.path; description = '' Path to moduli file to install in @@ -338,7 +347,7 @@ in ''} ${optionalString cfg.allowSFTP '' - Subsystem sftp ${cfgc.package}/libexec/sftp-server + Subsystem sftp ${cfgc.package}/libexec/sftp-server ${concatStringsSep " " cfg.sftpFlags} ''} PermitRootLogin ${cfg.permitRootLogin}