2023-01-03 05:34:45 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2023-01-03 05:16:12 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.c3d2.audioStreaming;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
2023-01-03 05:34:45 +01:00
|
|
|
c3d2.audioStreaming = lib.mkEnableOption "enable all services requires to audio stream to dacbert, glotzert or pulsebert";
|
2023-01-03 05:16:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg {
|
|
|
|
hardware.pulseaudio.zeroconf.discovery.enable = true;
|
|
|
|
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
|
|
|
|
services = {
|
|
|
|
avahi = {
|
|
|
|
enable = true;
|
|
|
|
nssmdns = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
pipewire = {
|
|
|
|
config.pipewire-pulse =
|
|
|
|
let
|
|
|
|
default-pipewire-pulse = lib.importJSON (pkgs.path + "/nixos/modules/services/desktops/pipewire/daemon/pipewire-pulse.conf.json");
|
|
|
|
in
|
|
|
|
default-pipewire-pulse // {
|
|
|
|
"context.modules" = default-pipewire-pulse."context.modules" ++ [
|
|
|
|
{
|
|
|
|
"name" = "libpipewire-module-zeroconf-discover";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
pulse.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|