Bjørn Forsman 39fad297fd nixos: fix "nixos-rebuild build-vm-with-bootloader" for EFI systems
`nixos-rebuild build-vm-with-bootloader` currently fails with the
default NixOS EFI configuration:

  $ cat >configuration.nix <<EOF
  {
    fileSystems."/".device = "/dev/sda1";
    boot.loader.systemd-boot.enable = true;
    boot.loader.efi.canTouchEfiVariables = true;
  }
  EOF

  $ nixos-rebuild build-vm-with-bootloader -I nixos-config=$PWD/configuration.nix -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-20.09.tar.gz
  [...]
  insmod: ERROR: could not insert module /nix/store/1ibmgfr13r8b6xyn4f0wj115819f359c-linux-5.4.83/lib/modules/5.4.83/kernel/fs/efivarfs/efivarfs.ko.xz: No such device
  mount: /sys/firmware/efi/efivars: mount point does not exist.
  [    1.908328] reboot: Power down
  builder for '/nix/store/dx2ycclyknvibrskwmii42sgyalagjxa-nixos-boot-disk.drv' failed with exit code 32
  [...]

Fix it by setting virtualisation.useEFIBoot = true in qemu-vm.nix, when
efi is needed.

And remove the now unneeded configuration in
./nixos/tests/systemd-boot.nix, since it's handled globally.

Before:
* release-20.03: successful build, unsuccessful run
* release-20.09 (and master): unsuccessful build

After:
* Successful build and run.

Fixes https://github.com/NixOS/nixpkgs/issues/107255
2020-12-21 08:55:13 +01:00
..
2020-10-25 11:01:31 +01:00
2020-11-09 22:50:17 +01:00
2020-10-25 11:01:30 +01:00
2020-09-10 01:08:22 +02:00
2020-09-18 12:42:23 +02:00
2020-10-20 17:38:20 +02:00
2020-11-25 13:00:41 -05:00
2020-11-28 13:42:36 -05:00
2020-12-09 13:24:48 +01:00
2020-10-25 11:01:31 +01:00
2020-10-25 11:01:31 +01:00
2020-10-26 16:25:37 -04:00
2020-12-07 14:09:50 +01:00
2020-10-23 18:12:45 -07:00
2020-09-07 11:21:26 +02:00
2020-10-25 11:01:30 +01:00
2020-09-12 19:30:17 +02:00
2020-10-25 11:01:30 +01:00
2020-11-28 13:42:36 -05:00
2020-10-25 11:01:30 +01:00
2020-12-10 12:59:13 -08:00
2020-11-10 10:49:27 +01:00
2020-12-15 09:10:34 -05:00
2020-09-09 20:07:17 +02:00
2020-12-17 16:58:57 +01:00
2020-12-17 09:05:53 -05:00
2020-11-23 08:42:51 +10:00
2020-12-05 11:02:40 +01:00
2020-11-16 14:00:34 -05:00
2020-10-25 11:01:30 +01:00
2020-11-02 08:16:01 -05:00
2020-10-25 11:01:30 +01:00
2020-11-04 20:37:50 -05:00
2020-11-24 12:42:06 -05:00
2020-12-09 05:37:31 +10:00
2020-11-12 20:00:50 +01:00
2020-11-23 08:42:51 +10:00
2020-11-11 09:32:06 -05:00
2020-11-04 11:30:36 -05:00
2020-11-05 08:32:28 -05:00
2020-09-13 19:28:51 +02:00
2020-10-25 11:01:30 +01:00
2020-10-25 11:01:31 +01:00
2020-11-27 15:09:19 +01:00
2020-11-18 21:42:01 +01:00
2020-10-25 11:01:30 +01:00
2020-11-30 16:21:41 -03:00
2020-10-25 11:01:30 +01:00
2020-10-25 11:01:30 +01:00
2020-11-30 16:34:53 +09:00
2020-11-24 12:42:06 -05:00
2020-11-16 22:13:13 -05:00
2020-12-18 12:07:30 -05:00