Remove hardcoded CPU architecture values #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story: So that I can run the VM framework on supported CPU architectures, shared modules should derive platform and virtualization settings instead of assuming one architecture family.
Part of the "Profiles & VM archetypes" arc.
The
vmframework hardcodesx86_64-linux(and Intel-specific KVM) in severalplaces. This blocks the
aarch64-linuxhost support the framework otherwiseadvertises, and bakes CPU assumptions into shared modules. These should be
parameterized so the framework evaluates and builds for any supported system.
Hardcoded values
flake.nix:25—apps.x86_64-linux.agenixpins the app output to a single system.flake.nix:27—program = "${agenix.packages.x86_64-linux.agenix}/bin/agenix"pins the package system.modules/qemu-guest.nix:18—nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"bakes an x86_64 default for the guest platform.modules/qemu-guest.nix:16—boot.kernelModules = [ "kvm-intel" ]assumes an Intel x86 host (AMD needskvm-amd;aarch64needs neither).Suggested approach
agenixapp over supported systems (e.g.flake-utils.lib.eachDefaultSystem, orgenAttrsover a systems list) instead of hardcodingx86_64-linux.nixpkgs.hostPlatformfrom consumer/inventory data (the machine'splatform) rather than a baked default.no-hardcoded-archflake check (asnexushas) that greps framework modules for literal Nix system strings, to prevent regressions.README.mdreferencesx86_64-linuxas well and should follow once the code is parameterized.