summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/share/anon-sftp.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2021-01-18 15:24:18 +0100
committertv <tv@krebsco.de>2021-01-18 15:24:18 +0100
commitff6f5ef5e1cdbd27b2211c54643fa2754f888cbb (patch)
treeb33763a7ac8040efe988f8bed2fe1c649cc155dd /makefu/2configs/share/anon-sftp.nix
parent7b7ebd8708885633c926c21a4b71d5d4ce8931cf (diff)
parent2a32b7731496615e43a06ec1049f6716c49a1999 (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'makefu/2configs/share/anon-sftp.nix')
-rw-r--r--makefu/2configs/share/anon-sftp.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/makefu/2configs/share/anon-sftp.nix b/makefu/2configs/share/anon-sftp.nix
new file mode 100644
index 000000000..7cde9317a
--- /dev/null
+++ b/makefu/2configs/share/anon-sftp.nix
@@ -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;
+ };
+
+}