27 lines
567 B
Nix
27 lines
567 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
environment.systemPackages = with pkgs; [
|
|
soapysdr-with-plugins
|
|
hackrf
|
|
];
|
|
|
|
users.users.soapysdr = {
|
|
isSystemUser = true;
|
|
group = "soapysdr";
|
|
};
|
|
users.groups.soapysdr = {};
|
|
systemd.services.soapysdr-server = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
serviceConfig = {
|
|
ExecStart = "${pkgs.soapysdr-with-plugins}/bin/SoapySDRServer --bind";
|
|
User = "soapysdr";
|
|
Group = "soapysdr";
|
|
ProtectSystem = "full";
|
|
ProtectHome = true;
|
|
Restart = "always";
|
|
RestartSec = "60s";
|
|
};
|
|
};
|
|
}
|