disable sd-image

This commit is contained in:
Travis Staton 2024-10-03 18:39:26 -04:00
parent db08995cd6
commit d039a262ce
No known key found for this signature in database
GPG key ID: E883E53CDAC16260
2 changed files with 12 additions and 9 deletions

View file

@ -53,15 +53,18 @@
core = import ./overlays (builtins.removeAttrs srcs [ "self" ]); core = import ./overlays (builtins.removeAttrs srcs [ "self" ]);
libcamera = import ./overlays/libcamera.nix (builtins.removeAttrs srcs [ "self" ]); libcamera = import ./overlays/libcamera.nix (builtins.removeAttrs srcs [ "self" ]);
}; };
nixosModules.raspberry-pi = import ./rpi { nixosModules = {
inherit pinned; raspberry-pi = import ./rpi {
core-overlay = self.overlays.core; inherit pinned;
libcamera-overlay = self.overlays.libcamera; core-overlay = self.overlays.core;
libcamera-overlay = self.overlays.libcamera;
};
sd-image = import ./sd-image;
}; };
nixosConfigurations = { nixosConfigurations = {
rpi-example = srcs.nixpkgs.lib.nixosSystem { rpi-example = srcs.nixpkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
modules = [ self.nixosModules.raspberry-pi ./example ]; modules = [ self.nixosModules.raspberry-pi self.nixosModules.sd-image ./example ];
}; };
}; };
checks.aarch64-linux = self.packages.aarch64-linux; checks.aarch64-linux = self.packages.aarch64-linux;

View file

@ -8,7 +8,7 @@ let
kernel = pkgs.rpi-kernels."${version}"."${board}"; kernel = pkgs.rpi-kernels."${version}"."${board}";
in in
{ {
imports = [ ../sd-image ./config.nix ./i2c.nix ]; imports = [ ./config.nix ./i2c.nix ];
options = with lib; { options = with lib; {
raspberry-pi-nix = { raspberry-pi-nix = {
@ -93,7 +93,7 @@ in
{ {
Type = "oneshot"; Type = "oneshot";
MountImages = MountImages =
"/dev/disk/by-label/${config.sdImage.firmwarePartitionName}:${firmware-path}"; "/dev/disk/by-label/FIRMWARE:${firmware-path}";
StateDirectory = "raspberrypi-firmware"; StateDirectory = "raspberrypi-firmware";
ExecStart = pkgs.writeShellScript "migrate-rpi-firmware" '' ExecStart = pkgs.writeShellScript "migrate-rpi-firmware" ''
shopt -s nullglob shopt -s nullglob
@ -308,8 +308,8 @@ in
# table, so the partition table id is a 1-indexed hex # table, so the partition table id is a 1-indexed hex
# number. So, we drop the hex prefix and stick on a "02" to # number. So, we drop the hex prefix and stick on a "02" to
# refer to the root partition. # refer to the root partition.
"root=PARTUUID=${lib.strings.removePrefix "0x" config.sdImage.firmwarePartitionID}-02" # "root=PARTUUID=${lib.strings.removePrefix "0x" config.sdImage.firmwarePartitionID}-02"
"rootfstype=ext4" # "rootfstype=ext4"
"fsck.repair=yes" "fsck.repair=yes"
"rootwait" "rootwait"
"init=/sbin/init" "init=/sbin/init"