configurations of hq services
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
1.3 KiB

{ config, lib, pkgs, ... }:
{
options.c3d2.audioServer = with lib; {
enable = mkEnableOption "Enable PulseAudio and Bluetooth sinks";
};
config = lib.mkIf config.c3d2.audioServer.enable {
# Enable sound.
sound.enable = true;
hardware.bluetooth = {
enable = lib.mkDefault true;
settings = {
Policy.AutoEnable = true;
General.DiscoverableTimeout = 0;
};
};
hardware.pulseaudio = {
enable = true;
systemWide = true;
tcp.enable = true;
tcp.anonymousClients.allowedIpRanges = [
"127.0.0.0/8"
"::1/128"
"fd23:42:c3d2:500::/56"
"172.22.99.0/24"
"172.20.72.0/21"
"2a00:8180:2c00:200::/56"
];
zeroconf.publish.enable = true;
package = pkgs.pulseaudioFull;
extraModules = [ pkgs.pulseaudio-modules-bt ];
};
#services.pipewire = {
# enable = true;
# alsa.enable = true;
# config.pipewire-pulse = lib.importJSON ./pipewire-pulse.conf.json;
# pulse.enable = true;
#};
security.rtkit.enable = true;
# tell Avahi to publish CUPS and PulseAudio
services.avahi = {
enable = true;
publish = {
enable = true;
addresses = true;
userServices = true;
};
};
};
}