virtualisation/oci-common: use mkImageMediaOverride...

...for filesystem options. Before this change,
users would typically encounter conflicting option definitions
when trying to build an image for a generic nixos closure, i.e.
`nixos-rebuild build-image --image-variant common --flake .#my-host`
This commit is contained in:
phaer
2025-04-11 12:54:12 +02:00
parent 2742c7163a
commit 61ba044658
+10 -8
View File
@@ -30,15 +30,17 @@ in
boot.growPartition = true;
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
autoResize = true;
};
fileSystems = lib.mkImageMediaOverride {
"/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
autoResize = true;
};
fileSystems."/boot" = lib.mkIf cfg.efi {
device = "/dev/disk/by-label/ESP";
fsType = "vfat";
"/boot" = lib.mkIf cfg.efi {
device = "/dev/disk/by-label/ESP";
fsType = "vfat";
};
};
boot.loader.efi.canTouchEfiVariables = false;