1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat(pipewire): try to do some pulseaudio networking stuff

This commit is contained in:
2024-01-02 10:35:03 +01:00
parent e5a3ce5f8d
commit ef7c53f15b
7 changed files with 23 additions and 42 deletions

View File

@@ -86,6 +86,7 @@ in {
hashedPasswordFile = config.age.secrets.kfm-password.path;
isNormalUser = true;
uid = 1000;
extraGroups = ["pipewire" "audio"];
};
age.secrets = {

View File

@@ -1,9 +1,6 @@
{pkgs, ...}: {
sound.enable = true;
# realtime audio
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa = {
@@ -16,25 +13,19 @@
systemd.user.services.pipewire-pulse.path = [pkgs.pulseaudio];
hardware.pulseaudio = {
enable = false;
package = pkgs.pulseaudioFull;
# copy server:/run/pulse/.config/pulse/cookie to client:~/.config/pulse/cookie to authenticate a client machine
zeroconf.discovery.enable = true;
extraConfig = ''
load-module ${
toString [
"module-tunnel-sink-new"
"server=zaatar.r"
"sink_name=zaatar"
"channels=2"
"rate=44100"
]
}
'';
services.avahi = {
enable = true;
publish.enable = true;
publish.userServices = true;
};
users.users.me.extraGroups = ["pipewire" "audio"];
environment.etc."pipewire/pipewire-pulse.conf.d/50-network-party.conf".text = ''
context.exec = [
{ path = "pactl" args = "load-module module-native-protocol-tcp" }
{ path = "pactl" args = "load-module module-zeroconf-discover" }
{ path = "pactl" args = "load-module module-zeroconf-publish" }
]
'';
environment.systemPackages = [
pkgs.pavucontrol