This document is a pending research item

I like to do remote software development from my under-powered Microsoft Surface laptop, utilising the significant hardware on my home desktop.

Now that I’ve switched to NixOS for my home desktop OS, I need to figure out my remote development workflow.

These are the notes for my investigation of what that might come to look like.

Requirements

Must Have

  • Secure remote access
  • Debugging tools (not just a text editor like vim)

Should Have

Nice to Have

  • Notebook support for visualisations

Won’t Have

Remote Development Options

Nix Shell Environments

VS Code Dev Containers

VS Code Remote Development

https://code.visualstudio.com/docs/remote/ssh

Fallback: Windows VM with RDP

If all else fails, I can at least for time’s sake set up a Windows VM and enable RDP to that.

Remote Desktop Solution

The above subjects are specifically for remote software development workflows, but I still wanted to have a more overarching access to my desktop environment. Here’s the notes from that

Linux Remote Desktop

Since switching from the Windows ecosystem, I’ve sorely missed RDP. My Linux distribution + desktop environment is pretty bleeding edge, and generally speaking RDP options of Linux are quite immature by comparison.

Below are my notes while I researched and attempted multiple different remote access options.

My system for reference:


Option 1: KRDP

Outcome: No Go. Throws errors in authentication, couldn't remedy

It appears there’s a KDE Plasma native RDP service in nix packages: kdePackages.krdp

After installation and setup, I try to connect from Windows but get an error

Because of a protocol error, this session will be disconnected.

I see the following in system logs on the host machine

Digging through forums suggests there’s a necessary dependency called freerdp to be installed. Tried installing both freerdp and freerdp3 but no help there. More digging suggests it’s an issue with the implementation of credential sharing within KRDP. Many people reporting same issue with no fix.

Next option…


Option 2: XRDP

Outcome: No Go. Can't even finish nix-rebuild with it enabled

Looks like it might be possible to get a plasma DE running via xRDP

Even if I got this working, it would be using the X windowing system, not Wayland which would leave me unable to hot load the live user environment, which is my goal. I may come back to this option, but for now, trying the next thing.


Option 3: Sunshine + Moonlight

Outcome: Go. Working Great!!

Reddit Tutorial Thread

Sunshine is actually a game streaming service, intended mostly as an alternative to Nvidia GeForce Now but it also natively supports remote-desktop as a use case.

At first, looked very complex to set up and use according to general internet threads, but then I came across a reddit tutorial. The entirety of that tutorial wasn’t necessary for me, but then I found the top commentor’s nix module and it was just magic.

All I had to do was add an auto-start target and it now works magically for me.

Here’s my work in a single commit, note that I bundled sunshine with a “gaming” module: https://github.com/smissingham/nixos-config/commit/2ec61a5e2a3f4ce2beede67345c5716d1de6a170


Option 4: Rustdesk

Outcome: No Go. Seems like Wayland + KDE6 not supported

Nixpkgs has two available packages

  • rustdesk - a gui, with all the needful features to run rustdesk remote
  • rustdesk-server - a relay server for ID relay, not to be confused with a headless backend

Rustdesk client throws error on connect:

Login Error. Failed to create capturer.

System logs show the following error, then a massive rust stack trace dump:


Link to original