i give up

This commit is contained in:
ChaotiCryptidz 2022-01-25 14:45:05 +00:00
parent 66092dd42c
commit c696c80012
8 changed files with 46 additions and 17 deletions

View file

@ -5,6 +5,6 @@
# to broadcast to all speakers over rtp
profiles.sound.pulseaudio.pulse-systemwide
profiles.sound.pulseaudio.pulse-recv-native-localhost
] ++ [ ./hosts/lappy.nix ];
] ++ [ ./hosts/lappy.nix ./hosts/raspberry.nix ];
}

View file

@ -0,0 +1,21 @@
{ ... }:
let
sink_name = "rtp-raspberry";
description = "Raspberry Output";
ip_addr = "100.118.202.64";
in {
hardware.pulseaudio = {
extraConfig = ''
load-module module-null-sink sink_name=${sink_name} sink_properties="device.description='${description}'"
load-module module-rtp-send source=${sink_name}.monitor destination_ip=${ip_addr}
'';
};
services.mpd.extraConfig = ''
audio_output {
type "pulse"
name "${description}"
target "${sink_name}"
server "127.0.0.1"
}
'';
}

View file

@ -1,5 +1,5 @@
{ pkgs, lib, tree, ... }: {
imports = [ ./mpd-broadcast/broadcast.nix ];
#imports = [ ./mpd-broadcast/broadcast.nix ];
environment.systemPackages = with pkgs; [ mpc_cli ];

View file

@ -9,8 +9,8 @@
profiles.tailscale
profiles.sshd
# make bluetooth work on pi
hosts.raspberry.services.btattach
hosts.raspberry.services.mpd-recv
profiles.connectivity.bluetooth
profiles.connectivity.ios
@ -33,7 +33,7 @@
networking.useDHCP = true;
networking.wireless = {
enable = false;
enable = true;
environmentFile = "/secrets/wifi-env";
networks.BT-JGA898.psk = "@PSK_HOME@";
};

View file

@ -1,10 +0,0 @@
{ pkgs, ... }: {
systemd.services.btattach = {
before = [ "bluetooth.service" ];
after = [ "dev-ttyAMA0.device" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.bluez}/bin/btattach -B /dev/ttyS1 -P bcm -S 3000000";
};
};
}

View file

@ -0,0 +1,18 @@
{ tree, ... }: {
imports = with tree; [
profiles.connectivity.bluetooth
profiles.sound.pulseaudio.pulse
profiles.sound.pulseaudio.pulse-systemwide
profiles.sound.pulseaudio.pulse-bluetooth
profiles.sound.pulseaudio.pulse-recv-native-localhost
profiles.sound.pulseaudio.pulse-recv-rtp
];
hardware.pulseaudio.extraConfig = ''
load-module module-bluetooth-policy
load-module module-bluetooth-discover
set-default-sink bluez_card.3E_39_E7_B2_86_29
'';
}
p

View file

@ -1,7 +1,7 @@
{ ... }: {
hardware.pulseaudio = {
extraConfig = ''
load-module module-native-protocol-tcp auth-anonymous=1 auth-ip-acl=127.0.0.1;
load-module module-native-protocol-tcp auth-anonymous=1 auth-ip-acl=127.0.0.1;192.168.1.0/24;100.115.10.34
'';
};
}

View file

@ -1,7 +1,7 @@
{ ... }: {
hardware.pulseaudio = {
extraConfig = ''
load-module module-rtp-recv latency_msec=50 sap_address=0.0.0.0
load-module module-rtp-recv latency_msec=500 sap_address=0.0.0.0
'';
};
}