diff --git a/hosts/Infini-DL360/ssh.nix b/hosts/Infini-DL360/ssh.nix index 70577fa..3b340fd 100644 --- a/hosts/Infini-DL360/ssh.nix +++ b/hosts/Infini-DL360/ssh.nix @@ -61,9 +61,17 @@ in }; }; + environment.systemPackages = with pkgs; [ xorg.xauth ]; + # https://enotacoes.wordpress.com/2021/10/05/limiting-user-to-sshfs-or-sftp-of-one-directory-only/ # https://github.com/NixOS/nixpkgs/blob/d603719ec6e294f034936c0d0dc06f689d91b6c3/nixos/modules/services/networking/ssh/sshd.nix#L663 services.openssh.extraConfig = '' + XAuthLocation ${pkgs.xorg.xauth}/bin/xauth + + Match user infinidoge + X11Forwarding yes + X11UseLocalhost no + Match user incoming AuthorizedKeysFile /etc/ssh/authorized_keys.d/infinidoge /etc/ssh/authorized_keys.d/%u ChrootDirectory /srv/external