diff options
author | K900 <me@0upti.me> | 2023-10-30 20:03:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-30 20:03:44 +0300 |
commit | 7bc18b63dae4fa0b75b4c8eec03b064b077d7bc0 (patch) | |
tree | 470c5bd3405f086f53658373024e7a37c8374b0a /nixos/tests | |
parent | 70f835f9aac39630643391f152d67d111303c128 (diff) | |
parent | cca22054c073694e4ca49ca6471be8326d43316b (diff) | |
download | nixpkgs-7bc18b63dae4fa0b75b4c8eec03b064b077d7bc0.tar nixpkgs-7bc18b63dae4fa0b75b4c8eec03b064b077d7bc0.tar.gz nixpkgs-7bc18b63dae4fa0b75b4c8eec03b064b077d7bc0.tar.bz2 nixpkgs-7bc18b63dae4fa0b75b4c8eec03b064b077d7bc0.tar.lz nixpkgs-7bc18b63dae4fa0b75b4c8eec03b064b077d7bc0.tar.xz nixpkgs-7bc18b63dae4fa0b75b4c8eec03b064b077d7bc0.tar.zst nixpkgs-7bc18b63dae4fa0b75b4c8eec03b064b077d7bc0.zip |
Merge pull request #227633 from ElvishJerricco/systemd-stage-1-fix-initrd-commands
Systemd stage 1 assert initrd commands are empty
Diffstat (limited to 'nixos/tests')
-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 56eecef2f41..fef8c700499 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) |