blob: 95e5ebc3a5c815b4e38aa577d9b798dacee5f385 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
{ config, lib, pkgs, ... }:
let cfg = config.my.hardware.sound;
in {
options.my.hardware.sound = with lib; {
pipewire = { enable = mkEnableOption "pipewire configuration"; };
};
config = lib.mkIf cfg.pipewire.enable {
sound.enable = true;
# RealtimeKit is recommended
security.rtkit.enable = true;
environment.systemPackages = with pkgs; [
# We install it to get access to pactl. It isn't enabled or run as a service.
pulseaudio
pavucontrol
];
services.pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse = { enable = true; };
jack = { enable = true; };
};
hardware.pulseaudio.enable = false;
};
}
|