2021-11-09 22:54:12 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
cfg = config.services.openwebrx;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.services.openwebrx = with lib; {
|
|
|
|
enable = mkEnableOption "OpenWebRX Web interface for Software-Defined Radios on http://localhost:8073";
|
|
|
|
|
2023-11-27 01:19:27 +01:00
|
|
|
package = mkPackageOption pkgs "openwebrx" { };
|
2021-11-09 22:54:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
systemd.services.openwebrx = {
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
path = with pkgs; [
|
|
|
|
csdr
|
2021-12-14 21:57:51 +01:00
|
|
|
digiham
|
2022-07-03 19:53:06 +02:00
|
|
|
codec2
|
|
|
|
js8call
|
2022-07-03 20:10:03 +02:00
|
|
|
m17-cxx-demod
|
2024-10-03 23:53:56 +02:00
|
|
|
alsa-utils
|
2021-11-09 22:54:12 +01:00
|
|
|
netcat
|
|
|
|
];
|
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${cfg.package}/bin/openwebrx";
|
|
|
|
Restart = "always";
|
|
|
|
DynamicUser = true;
|
|
|
|
# openwebrx uses /var/lib/openwebrx by default
|
|
|
|
StateDirectory = [ "openwebrx" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|