pipewire: Init and replace pulseaudio

upower
Simon Bruder 2021-07-10 12:44:09 +02:00
parent 3c753e8852
commit 7959abe5f0
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
3 changed files with 25 additions and 30 deletions

View File

@ -37,7 +37,7 @@
./office.nix
./prometheus/node_exporter.nix
./pubkeys.nix
./pulseaudio.nix
./pipewire.nix
./restic
./secrets.nix
./ssh.nix

24
modules/pipewire.nix Normal file
View File

@ -0,0 +1,24 @@
{ config, lib, pkgs, ... }:
let
bluetoothSupport = config.sbruder.full;
in
lib.mkIf config.sbruder.gui.enable {
sound.enable = true;
services.pipewire = {
enable = true;
pulse.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
};
environment.systemPackages = with pkgs; [
pavucontrol
pulseaudio # pacmd and pactl
];
hardware.bluetooth.enable = lib.mkDefault bluetoothSupport;
services.blueman.enable = lib.mkDefault bluetoothSupport;
}

View File

@ -1,29 +0,0 @@
{ config, lib, pkgs, ... }:
let
bluetoothSupport = config.sbruder.full;
in
lib.mkIf config.sbruder.gui.enable {
sound.enable = true;
hardware.pulseaudio = {
enable = true;
daemon.config = {
"default-sample-format" = "s16le";
"default-sample-rate" = "48000";
"alternate-sample-rate" = "44100";
"resample-method" = "soxr-hq";
"flat-volumes" = "no";
};
} // lib.optionalAttrs bluetoothSupport {
package = pkgs.pulseaudioFull;
extraModules = [
pkgs.pulseaudio-modules-bt # Non-standard codecs for bluetooth
];
};
environment.systemPackages = with pkgs; [
pavucontrol
];
hardware.bluetooth.enable = lib.mkDefault bluetoothSupport;
services.blueman.enable = lib.mkDefault bluetoothSupport;
}