audio: also kinda work on pure wayland systems

This commit is contained in:
Sandro - 2024-02-27 01:02:21 +01:00
parent 6d50ac7797
commit f50629267b
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@
let let
cfg = config.c3d2.audioStreaming; cfg = config.c3d2.audioStreaming;
isGraphical = config.services.xserver.enable || config.services.xserver.displayManager.defaultSession != null;
in in
{ {
options = { options = {
@ -15,7 +16,7 @@ in
} ]; } ];
}; };
environment.systemPackages = lib.mkIf config.services.xserver.enable (with pkgs; [ environment.systemPackages = lib.mkIf isGraphical (with pkgs; [
paprefs paprefs
pavucontrol pavucontrol
# https://wiki.archlinux.org/title/PulseAudio/Examples#PulseAudio_over_network # https://wiki.archlinux.org/title/PulseAudio/Examples#PulseAudio_over_network
@ -45,7 +46,7 @@ in
}; };
# required for paprefs to be able to save # required for paprefs to be able to save
programs.dconf = lib.mkIf config.services.xserver.enable { programs.dconf = lib.mkIf isGraphical {
enable = true; enable = true;
profiles.user.databases = [{ profiles.user.databases = [{
settings."org/freedesktop/pulseaudio/module-groups/zeroconf-discover" = { settings."org/freedesktop/pulseaudio/module-groups/zeroconf-discover" = {