[Request] NixOS compatibility
rdt-client performs write operations to its install path as part of preparing downloads, and as part of the download speed test. If running rdt-client as a service on NixOS, this behaviour results in errors because NixOS installs programs to a read-only filesystem. If possible, myself and other Nix users would greatly appreciate an alternative approach - perhaps a working directory at /var/rdt-client - that would allow rdt-client to run natively on NixOS. However, NixOS users can deploy rdt-client in a docker container or use other more advanced Nix wrapping methods to allow the program to function, so please consider this a low-priority request.
See also: #455
What version are you using? 2.0.73
Wat OS are you running? NixOS (Linux)
Are you using Docker or as a service? Service
Which debrid provider are you using?
Which downloader are you using?
Please attach a log file here with the log setting set to debug
I'm also a nixos user (running with docker though). I've been contributing more to this project recently, so I now feel comfortable enough with the codebase to take a crack at this.
@j-cray can you share any nix derivations you have for packaging rdt-client?
And logs from times when rdt-client tries to write to /nix/store paths would be super helpful too!
Does setting
systemd.services.rdt-client.serviceConfig.WorkingDirectory = "/var/rdt-client";
help at all (assuming you're running at a systemd service managed by nix)?
I can't work out why the download speed test would try to write to the working directory. It downloads the file to the Download Path you have set in settings, which is /data/downloads by default. I can't spot any code that would make it write to its working directory, but clearly I'm missing something. Any other eyes are appreciated!
If the Download Path is empty, an error is thrown when downloading, so I'm assuming it's not empty. If it were empty, then it would try to read/write to the working directory (I think)
Relevant Code (2.0.96, unchanged since 2.0.73)
https://github.com/rogerfar/rdt-client/blob/dc2ec486d7a9c5d95da47af74646588e83dc3682/server/RdtClient.Web/Controllers/SettingsController.cs#L80-L136