Commit 61ba0446 authored by phaer's avatar phaer
Browse files

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`
parent 2742c716
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -30,16 +30,18 @@ in

  boot.growPartition = true;

  fileSystems."/" = {
  fileSystems = lib.mkImageMediaOverride {
    "/" = {
      device = "/dev/disk/by-label/nixos";
      fsType = "ext4";
      autoResize = true;
    };

  fileSystems."/boot" = lib.mkIf cfg.efi {
    "/boot" = lib.mkIf cfg.efi {
      device = "/dev/disk/by-label/ESP";
      fsType = "vfat";
    };
  };

  boot.loader.efi.canTouchEfiVariables = false;
  boot.loader.grub = {