old
1{pkgs, ...}: {
2 #============================= Audio(PipeWire) =======================
3
4 # List packages installed in system profile. To search, run:
5 # $ nix search wget
6 environment.systemPackages = with pkgs; [
7 pulseaudio # provides `pactl`, which is required by some apps(e.g. sonic-pi)
8 ];
9
10 # PipeWire is a new low-level multimedia framework.
11 # It aims to offer capture and playback for both audio and video with minimal latency.
12 # It support for PulseAudio-, JACK-, ALSA- and GStreamer-based applications.
13 # PipeWire has a great bluetooth support, it can be a good alternative to PulseAudio.
14 # https://nixos.wiki/wiki/PipeWire
15 services.pipewire = {
16 enable = true;
17 # package = pkgs-unstable.pipewire;
18 alsa.enable = true;
19 alsa.support32Bit = true;
20 pulse.enable = true;
21 # If you want to use JACK applications, uncomment this
22 jack.enable = true;
23 wireplumber.enable = true;
24 };
25 # rtkit is optional but recommended
26 security.rtkit.enable = true;
27 # Disable pulseaudio, it conflicts with pipewire too.
28 services.pulseaudio.enable = false;
29
30 #============================= Bluetooth =============================
31
32 # enable bluetooth & gui paring tools - blueman
33 # or you can use cli:
34 # $ bluetoothctl
35 # [bluetooth] # power on
36 # [bluetooth] # agent on
37 # [bluetooth] # default-agent
38 # [bluetooth] # scan on
39 # ...put device in pairing mode and wait [hex-address] to appear here...
40 # [bluetooth] # pair [hex-address]
41 # [bluetooth] # connect [hex-address]
42 # Bluetooth devices automatically connect with bluetoothctl as well:
43 # [bluetooth] # trust [hex-address]
44 hardware.bluetooth.enable = true;
45 # services.blueman.enable = true; # KDE has bluetooth manager
46}