pipewire: Init and replace pulseaudio
This commit is contained in:
parent
3c753e8852
commit
7959abe5f0
|
@ -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
24
modules/pipewire.nix
Normal 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;
|
||||
}
|
|
@ -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;
|
||||
}
|
Loading…
Reference in a new issue