nixos/tests/swap-file-btrfs: Use autoFormat

This commit is contained in:
Will Fancher
2025-08-16 14:12:31 -04:00
parent bb51c2d8fe
commit 328b6d874b

View File

@@ -5,20 +5,18 @@
meta.maintainers = with lib.maintainers; [ oxalica ];
nodes.machine =
{ pkgs, ... }:
{ config, pkgs, ... }:
{
virtualisation.useDefaultFilesystems = false;
virtualisation.rootDevice = "/dev/vda";
boot.initrd.postDeviceCommands = ''
${pkgs.btrfs-progs}/bin/mkfs.btrfs --label root /dev/vda
'';
boot.initrd.systemd.enable = true;
virtualisation.fileSystems = {
"/" = {
device = "/dev/disk/by-label/root";
device = config.virtualisation.rootDevice;
fsType = "btrfs";
autoFormat = true;
};
};