From 35bbf24122dd03522dc281fef72309f206429c48 Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Sat, 16 Aug 2025 14:12:31 -0400 Subject: [PATCH] nixos/tests/bees: Use autoFormat --- nixos/tests/bees.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/nixos/tests/bees.nix b/nixos/tests/bees.nix index b9e38b385d3c..e13e169bff14 100644 --- a/nixos/tests/bees.nix +++ b/nixos/tests/bees.nix @@ -5,29 +5,33 @@ nodes.machine = { config, pkgs, ... }: { - boot.initrd.postDeviceCommands = '' - ${pkgs.btrfs-progs}/bin/mkfs.btrfs -f -L aux1 /dev/vdb - ${pkgs.btrfs-progs}/bin/mkfs.btrfs -f -L aux2 /dev/vdc - ''; virtualisation.emptyDiskImages = [ - 4096 - 4096 + { + size = 4096; + driveConfig.deviceExtraOpts.serial = "aux1"; + } + { + size = 4096; + driveConfig.deviceExtraOpts.serial = "aux2"; + } ]; virtualisation.fileSystems = { "/aux1" = { # filesystem configured to be deduplicated - device = "/dev/disk/by-label/aux1"; + device = "/dev/disk/by-id/virtio-aux1"; fsType = "btrfs"; + autoFormat = true; }; "/aux2" = { # filesystem not configured to be deduplicated - device = "/dev/disk/by-label/aux2"; + device = "/dev/disk/by-id/virtio-aux2"; fsType = "btrfs"; + autoFormat = true; }; }; services.beesd.filesystems = { aux1 = { - spec = "LABEL=aux1"; + spec = "/dev/disk/by-id/virtio-aux1"; hashTableSizeMB = 16; verbosity = "debug"; };