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

@@ -12,12 +12,12 @@ in {
./gaslight.nix
./kiosk.nix
./hardware-configuration.nix
./pulseaudio.nix
./home-assistant.nix
./mpd.nix
./grocy.nix
./spotifyd.nix
../../configs/keyboard.nix
../../configs/sound.nix
../../configs/monitoring.nix
../../configs/retiolum.nix
../../configs/printing.nix

View File

@@ -7,7 +7,7 @@
users.extraUsers.kiosk = {
isNormalUser = true;
password = "";
extraGroups = ["audio"];
extraGroups = ["audio" "pipewire"];
};
# TODO https://github.com/cage-kiosk/cage/issues/138
services.cage = {

View File

@@ -36,6 +36,8 @@ in {
};
};
users.users.${config.services.mpd.user}.extraGroups = ["pipewire"];
services.mpd = {
enable = true;
network.listenAddress = "0.0.0.0";
@@ -44,7 +46,7 @@ in {
auto_update "yes"
audio_output {
type "pulse"
type "pipewire"
name "zaatar single room audio system"
}
'';

View File

@@ -1,17 +0,0 @@
{pkgs, ...}: {
sound.enable = true;
environment.systemPackages = [pkgs.ncpamixer];
hardware.pulseaudio = {
package = pkgs.pulseaudioFull;
enable = true;
systemWide = true;
tcp = {
enable = true;
anonymousClients.allowedIpRanges = ["127.0.0.1" "10.243.2.0/24" "192.168.0.0/16"];
};
zeroconf.publish.enable = true;
};
networking.firewall.allowedTCPPorts = [4713];
}

View File

@@ -3,7 +3,10 @@
# mpris is a dbus service for controlling all music players with e.g. playerctl
# I do not need this, because I only interact with the service via Spotify Connect
# otherẃise it will pull in DBus which fails without X11
spotifyd = pkgs.spotifyd.overrideAttrs {withMPris = false;};
spotifyd = pkgs.spotifyd.overrideAttrs {
withMpris = false;
withKeyring = false;
};
};
services.spotifyd = {
@@ -12,7 +15,6 @@
global = {
username_cmd = "cat $CREDENTIALS_DIRECTORY/username";
password_cmd = "cat $CREDENTIALS_DIRECTORY/password";
backend = "pulseaudio";
bitrate = 320;
device_type = "s_t_b"; # set-top box
device_name = config.networking.hostName;
@@ -27,6 +29,8 @@
];
};
networking.firewall.allowedTCPPorts = [4713];
age.secrets = {
spotify-username.file = ../../secrets/spotify-username.age;
spotify-password.file = ../../secrets/spotify-password.age;