nix-config/hosts/radiobert/soapysdr.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
734 B
Nix
Raw Normal View History

2023-07-12 13:00:11 +02:00
{ pkgs, lib, ... }:
2021-10-14 16:11:56 +02:00
{
2023-07-12 13:00:11 +02:00
# disable firewall for soapysdr server as it will open new random ports for new connections
networking.firewall.enable = lib.mkForce false;
2021-10-14 16:11:56 +02:00
environment.systemPackages = with pkgs; [
soapysdr-with-plugins
hackrf
];
users = {
groups.soapysdr = {};
users.soapysdr = {
isSystemUser = true;
group = "soapysdr";
2022-06-12 17:26:32 +02:00
};
2021-10-14 16:11:56 +02:00
};
2022-06-12 17:26:32 +02:00
2021-10-14 16:11:56 +02:00
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";
2021-10-14 16:11:56 +02:00
};
};
}