anchor.diff:  in
   {
     options.sdImage = {
  +    imageName = mkOption {
  +      default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.system}.img";
  +      description = ''
  +        Name of the generated image file.
  +      '';
  +    };
  +
  +    imageBaseName = mkOption {
  +      default = "nixos-sd-image";
  +      description = ''
  +        Prefix of the name of the generated image file.
  +      '';
  +    };
  +
       storePaths = mkOption {
         type = with types; listOf package;
         example = literalExample "[ pkgs.stdenv ]";
  
positive.code: 
          # Copy the populated /boot into the SD image
          (cd boot; mcopy -bpsvm -i ../bootpart.img ./* ::)
          dd conv=notrunc if=bootpart.img of=$out seek=$START count=$SECTORS
        '';
      };
  
  
negative.code:         EOF
  
          # Copy the rootfs into the SD image
          eval $(partx $img -o START,SECTORS --nr 2 --pairs)
          dd conv=notrunc if=${rootfsImage} of=$img seek=$START count=$SECTORS
  
          # Create a FAT32 /boot partition of suitable size into bootpart.img
          eval $(partx $img -o START,SECTORS --nr 1 --pairs)
          truncate -s $((SECTORS * 512)) bootpart.img
          faketime "1970-01-01 00:00:00" mkfs.vfat -i 0x2178694e -n NIXOS_BOOT bootpart.img
  
  