mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-08 11:36:04 +01:00
disable sd-image
This commit is contained in:
parent
db08995cd6
commit
d039a262ce
2 changed files with 12 additions and 9 deletions
13
flake.nix
13
flake.nix
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue