summaryrefslogtreecommitdiffstats
path: root/makefu/2configs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-12-16 16:10:08 +0100
committermakefu <github@syntax-fehler.de>2020-12-16 16:10:08 +0100
commitdb80207267dd750d6e5fce0a4c15961aa324627b (patch)
tree8bfb1eafaeb723d945067cbfb2ddafdb4c371023 /makefu/2configs
parentdeb3343d1eff747f37d08730d187574677540bf7 (diff)
ma anon-sftp: init
Diffstat (limited to 'makefu/2configs')
-rw-r--r--makefu/2configs/ham/light/schlafzimmer.nix (renamed from makefu/2configs/ham/light/groups.nix)0
-rw-r--r--makefu/2configs/share/anon-sftp.nix25
2 files changed, 25 insertions, 0 deletions
diff --git a/makefu/2configs/ham/light/groups.nix b/makefu/2configs/ham/light/schlafzimmer.nix
index 274fd60a3..274fd60a3 100644
--- a/makefu/2configs/ham/light/groups.nix
+++ b/makefu/2configs/ham/light/schlafzimmer.nix
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;
+ };
+
+}