stockholm/makefu/2configs/share/anon-sftp.nix

26 lines
496 B
Nix
Raw Normal View History

2020-12-16 15:10:08 +00:00
{ config, lib, pkgs, ... }:
with import <stockholm/lib>;
{
services.openssh = {
allowSFTP = true;
sftpFlags = [ "-l VERBOSE" ];
extraConfig = ''
Match User anonymous
ForceCommand internal-sftp
AllowTcpForwarding no
X11Forwarding no
PasswordAuthentication no
'';
};
users.users.anonymous = {
uid = genid "anonymous";
useDefaultShell = false;
password = "anonymous";
home = "/media/anon";
createHome = true;
};
}