Closed SED4906 closed 1 month ago
Hi, this does sound like a user error.
It sounds like you generated a default config in (3) that does not import raspberry-pi-nix
, then switched. If that's correct, then a failure is expected.
This project supports and uses the default raspberry pi boot process, so you will need to switch to configurations that handle that appropriately. This project does handle that appropriately, so importing it remains important after the initial sd card image is written.
Some of what you mentioned is related to https://github.com/nix-community/raspberry-pi-nix/discussions/32, so you may find that discussion interesting.
how do I import raspberry-pi-nix
in this case?
what does a working configuration.nix look like?
The readme links the example repo https://github.com/tstat/raspberry-pi-nix-example/tree/master.
so I just have to use a flake.nix?
I haven't tried to use this flake in a while, but an update: after booting the built system, I put an adapted version of the example config in the README in /etc/nixos/flake.nix
and ran nixos-rebuild switch
, and it tried to rebuild everything again. Including the kernel. I couldn't get it to not do that after multiple attempts, so I gave up.
Did you include the flake.lock
file from this repo? Otherwise the rebuild will build against the then-current version of nixpkgs
, which will be different from the one this repo is locked to.
I'm not sure if this is actually just user error, but the process I attempted was:
root
and notice there's nothing in/etc/nixos/
so I run nixos-generate-confignixos-rebuild switch
fails because flakes aren't enabled (???)root
's per-user nix.confnixos-rebuild -I nixos-config=/etc/nixos/configuration.nix switch