NixOS on ARM/Raspberry Pi: Difference between revisions
imported>Samueldr m git commit --amend // definitely did not forget }} ; git push --force |
imported>Bkchr Adds how to for camera |
||
| Line 85: | Line 85: | ||
"console=ttyS0,115200n8" | "console=ttyS0,115200n8" | ||
]; | ]; | ||
} | |||
</nowiki>}} | |||
== Camera == | |||
For the camera to work, you will need to add the following code to your configuration.nix: | |||
{{note| These two pull requests are required to make this configuration.nix and the camera working: | |||
[https://github.com/NixOS/nixpkgs/pull/38490 #38490] | |||
[https://github.com/NixOS/nixpkgs/pull/38342 #38342]}} | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
{ config, pkgs, lib, ... }: | |||
{ | |||
boot.loader.raspberryPi.enable = true; | |||
# Set the version depending on your raspberry pi. | |||
boot.loader.raspberryPi.version = 3; | |||
# We need uboot | |||
boot.loader.raspberryPi.uboot.enable = true; | |||
# These two parameters are the important ones to get the | |||
# camera working. These will set `start_x=1` and | |||
# `gpu_mem=256` in /boot/configuration.txt | |||
boot.loader.raspberryPi.uboot.startx = true; | |||
boot.loader.raspberryPi.uboot.gpu_mem = 256; | |||
} | } | ||
</nowiki>}} | </nowiki>}} | ||