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