1 { config, lib, pkgs, ... }:
3 options.services.sdrplayApi = {
4 enable = lib.mkOption {
8 Whether to enable the SDRplay API service and udev rules.
11 To enable integration with SoapySDR and GUI applications like gqrx create an overlay containing
12 `soapysdr-with-plugins = super.soapysdr.override { extraPackages = [ super.soapysdrplay ]; };`
15 type = lib.types.bool;
19 config = lib.mkIf config.services.sdrplayApi.enable {
20 systemd.services.sdrplayApi = {
21 description = "SDRplay API Service";
22 after = [ "network.target" ];
23 wantedBy = [ "multi-user.target" ];
25 ExecStart = "${pkgs.sdrplay}/bin/sdrplay_apiService";
27 Restart = "on-failure";
31 services.udev.packages = [ pkgs.sdrplay ];