Skip to content

Commit 9ed85f8

Browse files
Merge pull request #1633 from NixOS/pi4-rendering
raspberrypi/4: fix many option rendering
2 parents c816590 + eb9e8e1 commit 9ed85f8

File tree

14 files changed

+74
-75
lines changed

14 files changed

+74
-75
lines changed

raspberry-pi/4/audio.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ in
1111
{
1212
options.hardware = {
1313
raspberry-pi."4".audio = {
14-
enable = lib.mkEnableOption ''
15-
configuration for audio
16-
'';
14+
enable = lib.mkEnableOption "configuration for audio";
1715
};
1816
};
1917

raspberry-pi/4/backlight.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ in
66
{
77
options.hardware = {
88
raspberry-pi."4".backlight = {
9-
enable = lib.mkEnableOption ''
10-
Enable the backlight support for the Raspberry Pi official Touch Display
11-
'';
9+
enable = lib.mkEnableOption "the backlight support for the Raspberry Pi official Touch Display";
1210
};
1311
};
1412

raspberry-pi/4/bluetooth.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ in
66
{
77
options.hardware = {
88
raspberry-pi."4".bluetooth = {
9-
enable = lib.mkEnableOption ''
10-
configuration for bluetooth
11-
'';
9+
enable = lib.mkEnableOption "configuration for bluetooth";
1210
};
1311
};
1412

raspberry-pi/4/digi-amp-plus.nix

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ in
66
{
77
options.hardware = {
88
raspberry-pi."4".digi-amp-plus = {
9-
enable = lib.mkEnableOption ''
10-
support for the IQaudIO DigiAMP+ Hat.
11-
'';
9+
enable = lib.mkEnableOption "support for the IQaudIO DigiAMP+ Hat";
1210

1311
unmuteAmp = lib.mkOption {
1412
type = lib.types.bool;
1513
default = false;
1614
description = ''
17-
"one-shot" unmute when kernel module first loads.
15+
Whether to "one-shot" unmute when kernel module first loads.
1816
'';
1917
};
2018

raspberry-pi/4/dwc2.nix

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,29 @@ in
66
{
77
options.hardware = {
88
raspberry-pi."4".dwc2 = {
9-
enable = lib.mkEnableOption ''
10-
Enable the UDC controller to support USB OTG gadget functions.
9+
enable = lib.mkOption {
10+
type = lib.types.bool;
11+
default = false;
12+
example = true;
13+
description = ''
14+
Enable the UDC controller to support USB OTG gadget functions.
1115
12-
In order to verify that this works, connect the Raspberry Pi with
13-
another computer via the USB C cable, and then do one of:
16+
In order to verify that this works, connect the Raspberry Pi with
17+
another computer via the USB C cable, and then do one of:
1418
15-
- `modprobe g_serial`
16-
- `modprobe g_mass_storage file=/path/to/some/iso-file.iso`
19+
- `modprobe g_serial`
20+
- `modprobe g_mass_storage file=/path/to/some/iso-file.iso`
1721
18-
On the Raspberry Pi, `dmesg` should then show success-indicating output
19-
that is related to the dwc2 and g_serial/g_mass_storage modules.
20-
On the other computer, a serial/mass-storage device should pop up in
21-
the system logs.
22+
On the Raspberry Pi, `dmesg` should then show success-indicating output
23+
that is related to the dwc2 and g_serial/g_mass_storage modules.
24+
On the other computer, a serial/mass-storage device should pop up in
25+
the system logs.
2226
23-
For more information about what gadget functions exist along with handy
24-
guides on how to test them, please refer to:
25-
https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt
26-
'';
27+
For more information about what gadget functions exist along with handy
28+
guides on how to test them, please refer to:
29+
https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt
30+
'';
31+
};
2732
dr_mode = lib.mkOption {
2833
type = lib.types.enum [
2934
"host"

raspberry-pi/4/i2c.nix

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,32 @@ in
3131
{
3232
options.hardware.raspberry-pi."4" = {
3333
i2c0 = {
34-
enable = lib.mkEnableOption ''
35-
Turn on the VideoCore I2C bus (maps to /dev/i2c-22) and enable access from the i2c group.
36-
After a reboot, i2c-tools (e.g. i2cdetect -F 22) should work for root or any user in i2c.
37-
'';
34+
enable = lib.mkEnableOption "" // {
35+
description = ''
36+
Turn on the VideoCore I2C bus (maps to /dev/i2c-22) and enable access from the i2c group.
37+
After a reboot, i2c-tools (e.g. i2cdetect -F 22) should work for root or any user in i2c.
38+
'';
39+
};
3840
frequency = lib.mkOption {
3941
type = lib.types.nullOr lib.types.int;
4042
default = null;
4143
description = ''
42-
interface clock-frequency
44+
The interface clock-frequency to configure.
4345
'';
4446
};
4547
};
4648
i2c1 = {
47-
enable = lib.mkEnableOption ''
48-
Turn on the ARM I2C bus (/dev/i2c-1 on GPIO pins 3 and 5) and enable access from the i2c group.
49-
After a reboot, i2c-tools (e.g. i2cdetect -F 1) should work for root or any user in i2c.
50-
'';
49+
enable = lib.mkEnableOption "" // {
50+
description = ''
51+
Turn on the ARM I2C bus (/dev/i2c-1 on GPIO pins 3 and 5) and enable access from the i2c group.
52+
After a reboot, i2c-tools (e.g. i2cdetect -F 1) should work for root or any user in i2c.
53+
'';
54+
};
5155
frequency = lib.mkOption {
5256
type = lib.types.nullOr lib.types.int;
5357
default = null;
5458
description = ''
55-
interface clock-frequency
59+
The interface clock-frequency to configure.
5660
'';
5761
};
5862
};

raspberry-pi/4/pkgs-overlays.nix

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ in
1010
{
1111
options.hardware = {
1212
raspberry-pi."4".apply-overlays-dtmerge = {
13-
enable = lib.mkEnableOption ''
14-
replace deviceTree.applyOverlays implementation to use dtmerge from libraspberrypi.
15-
this can resolve issues with applying dtbs for the pi.
16-
'';
13+
enable = lib.mkEnableOption "" // {
14+
description = ''
15+
Whether replace deviceTree.applyOverlays implementation to use dtmerge from libraspberrypi.
16+
This can resolve issues with applying dtbs for the pi.
17+
'';
18+
};
1719
};
1820
};
1921

raspberry-pi/4/poe-hat.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ in
66
{
77
options.hardware = {
88
raspberry-pi."4".poe-hat = {
9-
enable = lib.mkEnableOption ''
10-
support for the Raspberry Pi POE Hat.
11-
'';
9+
enable = lib.mkEnableOption "support for the Raspberry Pi POE Hat";
1210
};
1311
};
1412

raspberry-pi/4/poe-plus-hat.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ in
66
{
77
options.hardware = {
88
raspberry-pi."4".poe-plus-hat = {
9-
enable = lib.mkEnableOption ''
10-
support for the Raspberry Pi PoE+ HAT.
11-
'';
9+
enable = lib.mkEnableOption "support for the Raspberry Pi PoE+ HAT";
1210
};
1311
};
1412

raspberry-pi/4/pwm0.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ in
66
{
77
options.hardware = {
88
raspberry-pi."4".pwm0 = {
9-
enable = lib.mkEnableOption ''
10-
Enable support for the hardware pwm0 channel on GPIO_18
11-
'';
9+
enable = lib.mkEnableOption "support for the hardware pwm0 channel on GPIO_18";
1210
};
1311
};
1412

0 commit comments

Comments
 (0)