From 3718f356c08bc6d4fbcce96d48d9f26f416fd5a2 Mon Sep 17 00:00:00 2001 From: phaer Date: Fri, 11 Apr 2025 12:33:11 +0200 Subject: [PATCH] virtualisation/promxox-image: 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 proxmox --flake .#my-host` --- nixos/modules/virtualisation/proxmox-image.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/nixos/modules/virtualisation/proxmox-image.nix b/nixos/modules/virtualisation/proxmox-image.nix index 4e8d1e4c9174..25aa3aee93c7 100644 --- a/nixos/modules/virtualisation/proxmox-image.nix +++ b/nixos/modules/virtualisation/proxmox-image.nix @@ -352,14 +352,16 @@ with lib; ]; }; - fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; - autoResize = true; - fsType = "ext4"; - }; - fileSystems."/boot" = lib.mkIf hasBootPartition { - device = "/dev/disk/by-label/ESP"; - fsType = "vfat"; + fileSystems = lib.mkImageMediaOverride { + "/" = { + device = "/dev/disk/by-label/nixos"; + autoResize = true; + fsType = "ext4"; + }; + "/boot" = lib.mkIf hasBootPartition { + device = "/dev/disk/by-label/ESP"; + fsType = "vfat"; + }; }; networking = mkIf cfg.cloudInit.enable {