diff --git a/2configs/ham/light/groups.nix b/2configs/ham/light/schlafzimmer.nix similarity index 100% rename from 2configs/ham/light/groups.nix rename to 2configs/ham/light/schlafzimmer.nix diff --git a/2configs/share/anon-sftp.nix b/2configs/share/anon-sftp.nix new file mode 100644 index 0000000..7cde931 --- /dev/null +++ b/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; + }; + +}