summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/share-user-sftp.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2016-01-16 02:01:48 +0100
committermakefu <github@syntax-fehler.de>2016-01-16 02:01:48 +0100
commit7cf54a1d791fff716968a145feb55f28b84aef76 (patch)
treec140efc5965c2b4a74c1a479b7867148ea9bb4c6 /makefu/2configs/share-user-sftp.nix
parent3bb965c3f071f30a2ac381fb18cb2da5603193a3 (diff)
parent0c1c54e728d8838b184d43a9adb67f4258a21569 (diff)
Merge branch 'master' of gum:stockholm
Diffstat (limited to 'makefu/2configs/share-user-sftp.nix')
-rw-r--r--makefu/2configs/share-user-sftp.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/makefu/2configs/share-user-sftp.nix b/makefu/2configs/share-user-sftp.nix
new file mode 100644
index 000000000..2c93143ec
--- /dev/null
+++ b/makefu/2configs/share-user-sftp.nix
@@ -0,0 +1,21 @@
+{ config, ... }:
+
+{
+ users.users = {
+ share = {
+ uid = 9002;
+ home = "/var/empty";
+ openssh.authorizedKeys.keys = [ config.krebs.users.makefu.pubkey ];
+ };
+ };
+ # we will use internal-sftp to make uncomplicated Chroot work
+ services.openssh.extraConfig = ''
+ Match User share
+ ChrootDirectory /media
+ ForceCommand internal-sftp
+ AllowTcpForwarding no
+ PermitTunnel no
+ X11Forwarding no
+ Match All
+ '';
+}