conditionally build grub config