You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nixos-template-base/applications/terminal/radio.nix

31 lines
1016 B
Nix

{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
in
mkIf flags.radio {
# pour que ça marche
# sudo rmmod dvb_usb_rtl28xxu
# lecture radio FM
# rtl_fm -f 96.9e6 -M wbfm -s 440000 -r 44100 - | aplay -r 44100 -f S16_LE
# rtl_fm -f 96.95e6 -M wbfm -s 441000 -r 44100 - | aplay -r 44100 -f S16_LE -t raw -c 1
# rtl_fm -f 96.95e6 -M wbfm -s 441000 -r 44100 -E deemp - |pv| aplay -r 44100 -f S16_LE -t raw -c 1
# Paquets
environment.systemPackages = with pkgs; [
gnss-sdr # Global Navigation Satellite Systems software-defined receiver
liquid-dsp # Digital signal processing library for software-defined radios
rtl-sdr # Turns your Realtek RTL2832 based DVB dongle into a SDR receiver
dump1090 # Listen to planes ADS-B and view them on a map
rtl_433 # Read sensors on 433 MHz
];
hardware.rtl-sdr.enable = true;
}