ma anon-sftp: init
This commit is contained in:
parent
6dd0a9b39c
commit
9a66a3ad34
25
2configs/share/anon-sftp.nix
Normal file
25
2configs/share/anon-sftp.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ 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;
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in a new issue