diff options
author | Will Fancher <elvishjerricco@gmail.com> | 2023-04-22 10:39:30 -0400 |
---|---|---|
committer | Raito Bezarius <masterancpp@gmail.com> | 2023-10-30 12:15:58 +0100 |
commit | cca22054c073694e4ca49ca6471be8326d43316b (patch) | |
tree | 2dd09922dec1a2d07ae413ac8e7d742ae115e152 /nixos/tests/common | |
parent | ac1dd9de6ce5e3040c49101f21f204744905f418 (diff) |
systemd-stage-1: Add assertions for unsupported options.
Diffstat (limited to 'nixos/tests/common')
-rw-r--r-- | nixos/tests/common/auto-format-root-device.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/tests/common/auto-format-root-device.nix b/nixos/tests/common/auto-format-root-device.nix index 56eecef2f4110..fef8c70049913 100644 --- a/nixos/tests/common/auto-format-root-device.nix +++ b/nixos/tests/common/auto-format-root-device.nix @@ -5,19 +5,19 @@ # `virtualisation.fileSystems."/".autoFormat = true;` # instead. -{ config, pkgs, ... }: +{ lib, config, pkgs, ... }: let rootDevice = config.virtualisation.rootDevice; in { - boot.initrd.extraUtilsCommands = '' + boot.initrd.extraUtilsCommands = lib.mkIf (!config.boot.initrd.systemd.enable) '' # We need mke2fs in the initrd. copy_bin_and_libs ${pkgs.e2fsprogs}/bin/mke2fs ''; - boot.initrd.postDeviceCommands = '' + boot.initrd.postDeviceCommands = lib.mkIf (!config.boot.initrd.systemd.enable) '' # If the disk image appears to be empty, run mke2fs to # initialise. FSTYPE=$(blkid -o value -s TYPE ${rootDevice} || true) |