nixos/tests/swap-file-btrfs: Use autoFormat
This commit is contained in:
@@ -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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user