nixpkgs/nixos/modules
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
..
config console: remove console.extraTTYs option 2020-12-17 21:29:33 +01:00
hardware nixos/acpilight: add to packages 2020-11-12 05:22:18 +03:00
i18n/input-method hime: fix enable hime, remove hime-all package 2020-10-17 10:48:31 +08:00
installer nix: 2.3.9 -> 2.3.10 2020-12-18 12:33:49 +01:00
misc Revert "Module-builtin assertions, disabling assertions and submodule assertions" 2020-12-18 16:44:37 +01:00
profiles nixos/hardened: update blacklisted filesystems 2020-09-27 06:16:58 +00:00
programs Merge pull request #103813 from symphorien/firejail 2020-12-04 09:00:15 +01:00
security Merge pull request #101482 from m1cr0man/jwsfix 2020-12-20 11:06:19 +01:00
services Merge pull request #107112 from Izorkin/samba-wsdd-fix 2020-12-20 13:16:17 +01:00
system Revert "Module-builtin assertions, disabling assertions and submodule assertions" 2020-12-18 16:44:37 +01:00
tasks nixos auto-upgrade: remove flag when flake 2020-11-25 08:34:04 +01:00
testing nixos/tests: only apply qemu parameters if the options are defined 2020-10-25 13:42:01 +01:00
virtualisation nixos: fix "nixos-rebuild build-vm-with-bootloader" for EFI systems 2020-12-21 08:55:13 +01:00
module-list.nix Merge pull request #84324 from Emantor/init/icecc_icemon 2020-12-19 17:54:28 +01:00
rename.nix frab: remove package 2020-12-10 22:24:11 +01:00