From 84488b99a9f3fe88007fed803160204740b00e8e Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Sun, 3 Aug 2025 11:30:44 -0600 Subject: sys/[lustrated]: enable sshd-ula for remote login --- sys/auth/openssh.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'sys/auth/openssh.nix') diff --git a/sys/auth/openssh.nix b/sys/auth/openssh.nix index ca32979..07e6977 100644 --- a/sys/auth/openssh.nix +++ b/sys/auth/openssh.nix @@ -144,10 +144,16 @@ in }; systemd.sockets = mkIf (restrict != null && restrict.vsockCid != null) { - sshd = { - after = [ "nixvirt.service" ]; - socketConfig.ListenStream = mkForce [ "vsock:${toString restrict.vsockCid}:${toString port}" ]; - }; + sshd = + let + kernelMod = "modprobe@${if restrict.vsockCid == 2 then "vhost_" else ""}vsock.service"; + in + { + after = [ kernelMod ]; + wants = [ kernelMod ]; + + socketConfig.ListenStream = mkForce [ "vsock:${toString restrict.vsockCid}:${toString port}" ]; + }; }; users.users = { -- cgit v1.2.3