Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Current setup is needlessly non-generic, stateful, while paradoxically also overcomplicated #134

@WizardUli

Description

@WizardUli

I apologize for sounding harsh but since this is under nix-community owner on Github, it may be the first thing newcomers find when trying to build RPi images. Here are some issues (relevant at least when not using uboot):

  • The whole firmware/kernel/config migration process is very unnecessary hack for a problem which does not exists. Correct and simple way is to use system.build.installBootLoader.
  • There is no need to hard-code any part of disk setup at all.
  • Optional autoresize on the first boot is the only thing that needs to be stateful.
  • The whole sd-image is a mess and the fact that it comes from nixpkgs does not make it correct or good. It makes it sad.

Here is my own setup https://codeberg.org/Uli/nixsauce/src/commit/747a3eec343896a7a60a843f9f161427e7b0a884/nixos-configurations/rpi if you want a proof of concept:

  • I use ephemeral / which could be easily transformed to truly RO image. But the disk setup can be easily changed to anything.
  • Image building is done as described above.
  • I do not use multiple boot entries yet or config.txt generation from attrset.
  • There are tons of non-generic parts but they are clearly identifiable. I'm providing this just as a proof of concept that it all can be done much simpler at least in my personal opinion.

That was a piece of my acquired knowledge, do what you wish with it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions