@ -273,7 +273,7 @@ in
config = {
boot . loader . grub . device = mkOverride 50 " / d e v / v d a " ;
boot . loader . grub . device = mkVM Override " / d e v / v d a " ;
boot . initrd . supportedFilesystems = optional cfg . writableStore " u n i o n f s - f u s e " ;
@ -337,13 +337,13 @@ in
virtualisation . qemu . options = [ " - v g a s t d " " - u s b d e v i c e t a b l e t " ] ;
# Mount the host filesystem via 9P, and bind-mount the Nix store of
# the host into our own filesystem. We use mkOverride to allow this
# module to be applied to "normal" NixOS system configuration, where
# the regular value for the `fileSystems' attribute should be
# disregarded for the purpose of building a VM test image (since
# those filesystems don't exist in the VM).
fileSystems = mkOverride 10
# Mount the host filesystem via 9P, and bind-mount the Nix store
# of the host into our own filesystem. We use mkVM Override to
# allow this module to be applied to "normal" NixOS system
# configuration, where the regular value for the `fileSystems'
# attribute should be disregarded for the purpose of building a VM
# test image (since t hose filesystems don't exist in the VM).
fileSystems = mkVM Override
{ " / " . device = " / d e v / v d a " ;
" / n i x / s t o r e " =
{ device = " s t o r e " ;
@ -371,7 +371,7 @@ in
} ;
} ;
swapDevices = mkOverride 50 [ ] ;
swapDevices = mkVM Override [ ] ;
# Don't run ntpd in the guest. It should get the correct time from KVM.
services . ntp . enable = false ;
@ -385,10 +385,10 @@ in
# When building a regular system configuration, override whatever
# video driver the host uses.
services . xserver . videoDriver = mkOverride 50 null ;
services . xserver . videoDrivers = mkOverride 50 [ " v e s a " ] ;
services . xserver . defaultDepth = mkOverride 50 0 ;
services . xserver . resolutions = mkOverride 50 [ { x = 1024 ; y = 768 ; } ] ;
services . xserver . videoDriver = mkVM Override null ;
services . xserver . videoDrivers = mkVM Override [ " v e s a " ] ;
services . xserver . defaultDepth = mkVM Override 0 ;
services . xserver . resolutions = mkVM Override [ { x = 1024 ; y = 768 ; } ] ;
services . xserver . monitorSection =
''
# Set a higher refresh rate so that resolutions > 800x600 work.
@ -397,7 +397,7 @@ in
'' ;
# Wireless won't work in the VM.
networking . wireless . enable = mkOverride 50 false ;
networking . wireless . enable = mkVM Override false ;
system . requiredKernelConfig = with config . lib . kernelConfig ;
[ ( isEnabled " V I R T I O _ B L K " )