File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ { config , lib , ... } :
2
+
3
+ let
4
+ cfg = config . hardware . raspberry-pi . "4" . bluetooth ;
5
+ in
6
+ {
7
+ options . hardware = {
8
+ raspberry-pi . "4" . bluetooth = {
9
+ enable = lib . mkEnableOption ''
10
+ configuration for bluetooth
11
+ '' ;
12
+ } ;
13
+ } ;
14
+
15
+ config = lib . mkIf cfg . enable {
16
+ hardware . raspberry-pi . "4" . apply-overlays-dtmerge . enable = lib . mkDefault true ;
17
+ # doesn't work for the CM module, so we exclude e.g. bcm2711-rpi-cm4.dts
18
+ hardware . deviceTree . filter = "bcm2711-rpi-4*.dtb" ;
19
+
20
+ hardware . deviceTree = {
21
+ overlays = [
22
+ {
23
+ name = "bluetooth-overlay" ;
24
+ dtsText = ''
25
+ /dts-v1/;
26
+ /plugin/;
27
+
28
+ / {
29
+ compatible = "brcm,bcm2711";
30
+
31
+ fragment@0 {
32
+ target = <&uart0_pins>;
33
+ __overlay__ {
34
+ brcm,pins = <30 31 32 33>;
35
+ brcm,pull = <2 0 0 2>;
36
+ };
37
+ };
38
+ };
39
+ '' ;
40
+ }
41
+ ] ;
42
+ } ;
43
+ } ;
44
+ }
Original file line number Diff line number Diff line change 4
4
imports = [
5
5
./audio.nix
6
6
./backlight.nix
7
+ ./bluetooth.nix
7
8
./cpu-revision.nix
8
9
./digi-amp-plus.nix
9
10
./dwc2.nix
You can’t perform that action at this time.
0 commit comments