@@ -19,64 +19,7 @@ and `rpi/config.nix`. The other modules are mostly wrappers that set
19
19
20
20
## Example
21
21
22
- See the ` rpi-example ` config in this flake for a CI-checked example.
23
-
24
- ``` nix
25
- {
26
- description = "raspberry-pi-nix example";
27
- inputs = {
28
- nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
29
- raspberry-pi-nix.url = "github:nix-community/raspberry-pi-nix";
30
- };
31
-
32
- outputs = { self, nixpkgs, raspberry-pi-nix }:
33
- let
34
- inherit (nixpkgs.lib) nixosSystem;
35
- basic-config = { pkgs, lib, ... }: {
36
- # bcm2711 for rpi 3, 3+, 4, zero 2 w
37
- # bcm2712 for rpi 5
38
- # See the docs at:
39
- # https://www.raspberrypi.com/documentation/computers/linux_kernel.html#native-build-configuration
40
- raspberry-pi-nix.board = "bcm2711";
41
- time.timeZone = "America/New_York";
42
- users.users.root.initialPassword = "root";
43
- networking = {
44
- hostName = "basic-example";
45
- useDHCP = false;
46
- interfaces = {
47
- wlan0.useDHCP = true;
48
- eth0.useDHCP = true;
49
- };
50
- };
51
- hardware = {
52
- bluetooth.enable = true;
53
- raspberry-pi = {
54
- config = {
55
- all = {
56
- base-dt-params = {
57
- # enable autoprobing of bluetooth driver
58
- # https://github.com/raspberrypi/linux/blob/c8c99191e1419062ac8b668956d19e788865912a/arch/arm/boot/dts/overlays/README#L222-L224
59
- krnbt = {
60
- enable = true;
61
- value = "on";
62
- };
63
- };
64
- };
65
- };
66
- };
67
- };
68
- };
69
-
70
- in {
71
- nixosConfigurations = {
72
- rpi-example = nixosSystem {
73
- system = "aarch64-linux";
74
- modules = [ raspberry-pi-nix.nixosModules.raspberry-pi basic-config ];
75
- };
76
- };
77
- };
78
- }
79
- ```
22
+ See the ` rpi-example ` config in this flake for an example config built by CI.
80
23
81
24
## Using the provided cache to avoid compiling linux
82
25
This repo uses the raspberry pi linux kernel fork, and compiling linux takes a
@@ -87,10 +30,10 @@ to use this cache.
87
30
88
31
## Building an sd-card image
89
32
90
- An image suitable for flashing to an sd-card can be found at the
91
- attribute ` config.system.build.sdImage ` . For example, if you wanted to
92
- build an image for ` rpi-example ` in the above configuration
93
- example you could run:
33
+ Include the provided ` sd-image ` nixos module this flake provides, then an image
34
+ suitable for flashing to an sd-card can be found at the attribute
35
+ ` config.system. build.sdImage ` . For example, if you wanted to build an image for
36
+ ` rpi-example ` in the above configuration example you could run:
94
37
95
38
```
96
39
nix build '.#nixosConfigurations.rpi-example.config.system.build.sdImage'
0 commit comments