This commit is contained in:
makefu 2024-05-08 21:45:52 +02:00
parent 441dfb9f8f
commit 313324d31d
No known key found for this signature in database
GPG key ID: 36F7711F3FC0F225
2 changed files with 9 additions and 9 deletions

View file

@ -11,16 +11,16 @@ in {
config = {
# pipewire workaround for mpd to play music on kiosk user
services.mpd.user = "kiosk";
systemd.services.mpd.environment = {
# https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609
XDG_RUNTIME_DIR = "/run/user/${toString config.users.users.kiosk.uid}";
};
services.mpd = {
enable = true;
inherit (cfg) musicDirectory;
network.listenAddress = "0.0.0.0";
network.listenAddress = "any";
user = "kiosk"; # run mpd under pipewire user
startWhenNeeded = true;
extraConfig = ''
audio_output {
type "pipewire"
@ -38,11 +38,11 @@ in {
};
sound.enable = true;
# connect via https://nixos.wiki/wiki/Bluetooth#Using_Bluetooth_headsets_with_PulseAudio
# connect via https://wiki.nixos.org/wiki/Bluetooth#Using_Bluetooth_headsets_with_PulseAudio
hardware.bluetooth.enable = true;
# environment.etc."bluetooth/audio.conf".text = ''
# [General]
# Enable = Source,Sink,Media,Socket
# '';
environment.etc."bluetooth/audio.conf".text = ''
[General]
Enable = Source,Sink,Media,Socket
'';
};
}

View file

@ -28,7 +28,7 @@
# Enable profile:
## pacmd set-card-profile "$(pactl list cards short | egrep -o bluez_card[[:alnum:]._]+)" a2dp_sink
# connect via https://nixos.wiki/wiki/Bluetooth#Using_Bluetooth_headsets_with_PulseAudio
# connect via https://wiki.nixos.org/wiki/Bluetooth#Using_Bluetooth_headsets_with_PulseAudio
hardware.bluetooth = {
enable = true;
powerOnBoot = false;