From bb51c2d8fe4ba70d5400932f625c1e828708a60c Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Sat, 16 Aug 2025 14:12:31 -0400 Subject: [PATCH] nixos/tests/snapper: Use autoFormat --- nixos/tests/snapper.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/nixos/tests/snapper.nix b/nixos/tests/snapper.nix index 4a03b85cc71d..b8a86c51d694 100644 --- a/nixos/tests/snapper.nix +++ b/nixos/tests/snapper.nix @@ -5,16 +5,18 @@ nodes.machine = { pkgs, lib, ... }: { - boot.initrd.postDeviceCommands = '' - ${pkgs.btrfs-progs}/bin/mkfs.btrfs -f -L aux /dev/vdb - ''; - - virtualisation.emptyDiskImages = [ 4096 ]; + virtualisation.emptyDiskImages = [ + { + size = 4096; + driveConfig.deviceExtraOpts.serial = "aux"; + } + ]; virtualisation.fileSystems = { "/home" = { - device = "/dev/disk/by-label/aux"; + device = "/dev/disk/by-id/virtio-aux"; fsType = "btrfs"; + autoFormat = true; }; }; services.snapper.configs.home.SUBVOLUME = "/home";