···302302 if is_default:
303303 write_loader_conf(*gen)
304304 except OSError as e:
305305- profile = f"profile '{gen.profile}'" if gen.profile else "default profile"
306306- print("ignoring {} in the list of boot entries because of the following error:\n{}".format(profile, e), file=sys.stderr)
305305+ # See https://github.com/NixOS/nixpkgs/issues/114552
306306+ if e.errno == errno.EINVAL:
307307+ profile = f"profile '{gen.profile}'" if gen.profile else "default profile"
308308+ print("ignoring {} in the list of boot entries because of the following error:\n{}".format(profile, e), file=sys.stderr)
309309+ else:
310310+ raise e
307311308312 for root, _, files in os.walk('@efiSysMountPoint@/efi/nixos/.extra-files', topdown=False):
309313 relative_root = root.removeprefix("@efiSysMountPoint@/efi/nixos/.extra-files").removeprefix("/")