# configuration allowing this machine to be user as a backup server { config, lib, pkgs, ... }: { users.users.backup = { isNormalUser = true; openssh.authorizedKeys.keys = [ ''command="${pkgs.rrsync}/bin/rrsync /mnt/backup",restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF1e7hxxQD7pVKMquEuiBrLNFfx9ZRAOU1SGky4iXacD'' #''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF1e7hxxQD7pVKMquEuiBrLNFfx9ZRAOU1SGky4iXacD Ithuriel@openmediavault'' ]; packages = [ pkgs.rsync pkgs.rrsync ]; }; services.openssh = { enable = true; ports = [ 22 ]; settings = { PasswordAuthentication = true; KbdInteractiveAuthentication = false; # AllowUsers = [ "backup" ]; # UseDns = true; X11Forwarding = false; PermitRootLogin = "no"; }; }; networking.firewall.allowedTCPPorts = [ 22 ]; }