tests/virtualbox: Fix long line in guestAdditions.
This is essentially not only "wrapping" the line but refactoring into a shorter name which is used in two places. And yes, I know I'm very pedantic if it comes to whitespaces and line lengths, but I made sure this doesn't change any functionality: $ nix-instantiate nixos/tests/virtualbox.nix ... /nix/store/cldxyrxqvwpqm02cd3lvknnmj4qmblyn-vm-test-run-virtualbox.drv $ git stash pop ... $ nix-instantiate nixos/tests/virtualbox.nix ... /nix/store/cldxyrxqvwpqm02cd3lvknnmj4qmblyn-vm-test-run-virtualbox.drv $ Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
8f98226f50
commit
17f58275a0
@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let
|
import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let
|
||||||
|
|
||||||
testVMConfig = vmName: attrs: { config, pkgs, ... }: {
|
testVMConfig = vmName: attrs: { config, pkgs, ... }: let
|
||||||
boot.kernelParams = let
|
guestAdditions = pkgs.linuxPackages.virtualboxGuestAdditions;
|
||||||
|
|
||||||
miniInit = ''
|
miniInit = ''
|
||||||
#!${pkgs.stdenv.shell} -xe
|
#!${pkgs.stdenv.shell} -xe
|
||||||
export PATH="${pkgs.coreutils}/bin:${pkgs.utillinux}/bin"
|
export PATH="${pkgs.coreutils}/bin:${pkgs.utillinux}/bin"
|
||||||
@ -21,7 +22,7 @@ import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let
|
|||||||
/etc/dbus-1/system.conf
|
/etc/dbus-1/system.conf
|
||||||
"${pkgs.dbus.daemon}/bin/dbus-daemon" --fork --system
|
"${pkgs.dbus.daemon}/bin/dbus-daemon" --fork --system
|
||||||
|
|
||||||
${pkgs.linuxPackages.virtualboxGuestAdditions}/bin/VBoxService
|
${guestAdditions}/bin/VBoxService
|
||||||
${(attrs.vmScript or (const "")) pkgs}
|
${(attrs.vmScript or (const "")) pkgs}
|
||||||
|
|
||||||
i=0
|
i=0
|
||||||
@ -33,7 +34,8 @@ import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let
|
|||||||
|
|
||||||
rm -f /mnt-root/boot-done /mnt-root/shutdown
|
rm -f /mnt-root/boot-done /mnt-root/shutdown
|
||||||
'';
|
'';
|
||||||
in [
|
in {
|
||||||
|
boot.kernelParams = [
|
||||||
"console=tty0" "console=ttyS0" "ignore_loglevel"
|
"console=tty0" "console=ttyS0" "ignore_loglevel"
|
||||||
"boot.trace" "panic=1" "boot.panic_on_fail"
|
"boot.trace" "panic=1" "boot.panic_on_fail"
|
||||||
"init=${pkgs.writeScript "mini-init.sh" miniInit}"
|
"init=${pkgs.writeScript "mini-init.sh" miniInit}"
|
||||||
@ -52,7 +54,7 @@ import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let
|
|||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.extraUtilsCommands = ''
|
boot.initrd.extraUtilsCommands = ''
|
||||||
copy_bin_and_libs "${pkgs.linuxPackages.virtualboxGuestAdditions}/bin/mount.vboxsf"
|
copy_bin_and_libs "${guestAdditions}/bin/mount.vboxsf"
|
||||||
copy_bin_and_libs "${pkgs.utillinux}/bin/unshare"
|
copy_bin_and_libs "${pkgs.utillinux}/bin/unshare"
|
||||||
${(attrs.extraUtilsCommands or (const "")) pkgs}
|
${(attrs.extraUtilsCommands or (const "")) pkgs}
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user