summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/share-user-sftp.nix
diff options
context:
space:
mode:
authormakefu <makefu@nixos.dev>2016-01-18 12:50:20 +0100
committermakefu <makefu@nixos.dev>2016-01-18 12:50:20 +0100
commitf4754010336a1d7c876bc6797a44f30e3d4b4ead (patch)
treede4dff5340b76d970cc404146e688726e4446e0f /makefu/2configs/share-user-sftp.nix
parentb86daca11669019d3c2218e623bfb57b5a8033d7 (diff)
parentde891cf43181d28cbc9526993df4e55022d230da (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
+ '';
+}