nixos/qemu-vm: (re-)move old/incorrect comments
This commit is contained in:
parent
dc7fb56f04
commit
8ea8154a32
|
@ -1,11 +1,8 @@
|
|||
# This module creates a virtual machine from the NixOS configuration.
|
||||
# Building the `config.system.build.vm' attribute gives you a command
|
||||
# that starts a KVM/QEMU VM running the NixOS configuration defined in
|
||||
# `config'. The Nix store is shared read-only with the host, which
|
||||
# makes (re)building VMs very efficient. However, it also means you
|
||||
# can't reconfigure the guest inside the guest - you need to rebuild
|
||||
# the VM in the host. On the other hand, the root filesystem is a
|
||||
# read/writable disk image persistent across VM reboots.
|
||||
# `config'. By default, the Nix store is shared read-only with the
|
||||
# host, which makes (re)building VMs very efficient.
|
||||
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
|
@ -1026,7 +1023,6 @@ in
|
|||
"-netdev user,id=user.0,${forwardingOptions}${restrictNetworkOption}\"$QEMU_NET_OPTS\""
|
||||
];
|
||||
|
||||
# FIXME: Consolidate this one day.
|
||||
virtualisation.qemu.options = mkMerge [
|
||||
(mkIf cfg.qemu.virtioKeyboard [
|
||||
"-device virtio-keyboard"
|
||||
|
@ -1078,14 +1074,12 @@ in
|
|||
}) cfg.emptyDiskImages)
|
||||
];
|
||||
|
||||
# Use mkVMOverride to enable building test VMs (e.g. via `nixos-rebuild
|
||||
# build-vm`) of a system configuration, where the regular value for the
|
||||
# `fileSystems' attribute should be disregarded (since those filesystems
|
||||
# don't necessarily exist in the VM).
|
||||
fileSystems = mkVMOverride cfg.fileSystems;
|
||||
|
||||
# Mount the host filesystem via 9P, and bind-mount the Nix store
|
||||
# of the host into our own filesystem. We use mkVMOverride 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).
|
||||
virtualisation.fileSystems = let
|
||||
mkSharedDir = tag: share:
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue