AshleyYakeley / NixVirt

LibVirt domain management for Nix
MIT License
192 stars 21 forks source link

cpu.model.name fails to build with: `NixVirt: expected set or null, found lambda` #66

Closed Libadoxon closed 1 month ago

Libadoxon commented 1 month ago

When a domain sets cpu.model.name the evaluation is aborted with: error: evaluation aborted with the following error message: 'NixVirt: expected set or null, found lambda'. Minimal working example:

nixvirt.lib.domain.writeXML { 
  name = "foo";
  cpu = {
    model = {
      name = "test";
    };
  };
}
AshleyYakeley commented 1 month ago

OK, I think I see the cause.

AshleyYakeley commented 1 month ago

OK, fixed now.

Libadoxon commented 1 month ago

I can confirm that this commit fixed the issue for cpu.model.name but it seems that this isn't the only attribute that was broken as I still can't rebuild with the same error. I must have missed the other cases of this issue when first diagnosing. I will look what other attributes are affected.

Libadoxon commented 1 month ago

Should I open a new issue for the other broken attributes I find or refactor this one?

Libadoxon commented 1 month ago

okay so I couldn't find any other broken attributes, no idea why I was still getting the error message. Maybe something was cached weird. Anyway everything is resolved now.