From adf670acf27505fb8119055003155a1c68b575d9 Mon Sep 17 00:00:00 2001 From: Travis Staton Date: Mon, 18 Mar 2024 20:28:06 -0400 Subject: [PATCH] don't hardcode root partition uuid --- rpi/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpi/default.nix b/rpi/default.nix index 24d3a45..475c9ad 100644 --- a/rpi/default.nix +++ b/rpi/default.nix @@ -33,7 +33,11 @@ in boot.kernelParams = if cfg.uboot.enable then [ ] else [ - "root=PARTUUID=2178694e-02" # todo: use option + # This is ugly and fragile, but the sdImage image has an msdos + # table, so the partition table id is a 1-indexed hex + # number. So, we drop the hex prefix and stick on a "02" to + # refer to the root partition. + "root=PARTUUID=${lib.strings.removePrefix "0x" config.sdImage.firmwarePartitionID}-02" "rootfstype=ext4" "fsck.repair=yes" "rootwait"