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 ]; meta.maintainers = with lib.maintainers; [ oxalica ];
nodes.machine = nodes.machine =
{ pkgs, ... }: { config, pkgs, ... }:
{ {
virtualisation.useDefaultFilesystems = false; virtualisation.useDefaultFilesystems = false;
virtualisation.rootDevice = "/dev/vda"; virtualisation.rootDevice = "/dev/vda";
boot.initrd.postDeviceCommands = '' boot.initrd.systemd.enable = true;
${pkgs.btrfs-progs}/bin/mkfs.btrfs --label root /dev/vda
'';
virtualisation.fileSystems = { virtualisation.fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-label/root"; device = config.virtualisation.rootDevice;
fsType = "btrfs"; fsType = "btrfs";
autoFormat = true;
}; };
}; };