diff --git a/flake.nix b/flake.nix index 63296c0..3aa61e9 100644 --- a/flake.nix +++ b/flake.nix @@ -331,6 +331,34 @@ diskSize = "auto"; }; + # BATM3 (OptiPlex 9030 AIO board-swap) installed image, dd-able to + # its SATA drive. Unlike the douro/sintra images, this one grows + # itself: growPartition expands the root partition to fill whatever + # drive it lands on (16GB today) at first boot and autoResize + # stretches the ext4 to match — no manual parted/resize2fs step + # after flashing, and all the drive's headroom is available to the + # nix store from day one (cf. #55). Image-only override: once + # grown, subsequent nixos-rebuilds against plain batm3-installed + # are unaffected. + disk-image-batm3 = + let + cfg = self.nixosConfigurations.batm3-installed.extendModules { + modules = [ + { + boot.growPartition = true; + fileSystems."/".autoResize = true; + } + ]; + }; + in + import (nixpkgs + "/nixos/lib/make-disk-image.nix") { + inherit pkgs lib; + config = cfg.config; + format = "raw"; + partitionTableType = "efi"; + diskSize = "auto"; + }; + # USB-bootable Sintra image with DISTINCT partition labels # (nixos-usb / ESP-USB) so the stick can be booted on a Sintra whose # eMMC already holds a nixos/ESP-labelled install without a by-label