/boot/config.txt related questions for Raspberry Pi

I’m trying to setup my Raspberry Pi 3B+ with NixOS along with specific Raspberry Pi targeted hardware. According to the manufacturer, I just need to add the following lines to my /boot/config.txt:


I’ve successfully made sure this line works with the hardware on an Arch Linux installation.

As for the NixOS setup, I have several questions:

  1. It seems boot.loader.raspberryPi.firmwareConfig is responsible for editing /boot/config.txt, yet I don’t see any change in it when I change this option’s value. Is it normal? Should I update it manually?
  2. Do I have to worry that the kernel I use (pkgs.linuxPackages_latest) doesn’t support this hardware? Can / should I switch to pkgs.linuxPackages_rpi?
  3. Apparently, that hardware’s manufacturer assumes I’m using a Raspberry Pi with a device tree overlays compatible Linux distribution. I’ll split this question into 4:
    • On my Arch Linux SD, I can see all of the ‘overlays’ .dtb files in /boot/overlays/ partition. Why don’t they appear in the NixOS SD?
    • Should I consider not using uboot at all? I understand it means my system upgrades won’t be atomic if there’s only 1 image configured for boot at any given time. I ask because I’m not sure but it seems that (at least in the past) device tree overlays are / were not supported with uboot. That post is old and there seems to be evidence (credit) that it does support this feature. Maybe NixOS just doesn’t take advantage of that?
    • I’ve tried setting boot.loader.raspberryPi.uboot.enable to false (although it’s supposed to be the default value) and nixos-rebuild switch but it had no effect.
    • Assuming device tree overlays are indeed supported by U-boot, do I just need to get these .dtb files and put them in /boot/overlays/ and it will just work? Could / should there be a better way to do that in a more pragmatic way?

I’ve chatted with @samueldr and @itorres on parts of these subjects but it was oftopic and now I’m opening a separate thread. Any other Raspberry Pi related user is more then invited to answer.

I hope I won’t be considered too impolite for doing this but these are the people who’ve contributed to Nixpkgs’ raspbarrypi.nix and that I could match their GitHub username and the discourse username:

Please don’t be mad at me if you don’t want to respond and you think that’s rude.



Did you ever figure this out? I managed to get the rpi kernel working, but I can’t get my device to load (IQAudIO DAC). AFAIK the firmware partition is not managed by nix after the initial installation, so it does not get the .dtb files (if it’s even needed?), nor changes to config.txt specified in configuration.nix.

I didn’t install NixOS on my Raspberry eventually, but I did find out it might be possible to install such a system configuration via:


Other (more) relevant links:



Which describes some issues one can face when using raspberry pi foundation overlays and our tooling.

I created a new thread for the same problem: Raspberry Pi and config.txt - #2 by louwers