about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathijs Kwik <mathijs@bluescreen303.nl>2014-12-19 11:59:00 +0100
committerMathijs Kwik <mathijs@bluescreen303.nl>2014-12-19 11:59:00 +0100
commit6e728a42ece08c4824cea422d273bc6070a038eb (patch)
tree3084c413c441ffd422329b69978bcc54bc05d599
parent5191d694c2051e0caa666eaf1ec87eb307942bb7 (diff)
downloadnixlib-6e728a42ece08c4824cea422d273bc6070a038eb.tar
nixlib-6e728a42ece08c4824cea422d273bc6070a038eb.tar.gz
nixlib-6e728a42ece08c4824cea422d273bc6070a038eb.tar.bz2
nixlib-6e728a42ece08c4824cea422d273bc6070a038eb.tar.lz
nixlib-6e728a42ece08c4824cea422d273bc6070a038eb.tar.xz
nixlib-6e728a42ece08c4824cea422d273bc6070a038eb.tar.zst
nixlib-6e728a42ece08c4824cea422d273bc6070a038eb.zip
virtualisation.qemuNetworkingOptions -> virtualisation.qemu.networkingOptions
-rw-r--r--nixos/modules/virtualisation/qemu-vm.nix50
1 files changed, 26 insertions, 24 deletions
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix
index 49376bab41e6..42986aa3e033 100644
--- a/nixos/modules/virtualisation/qemu-vm.nix
+++ b/nixos/modules/virtualisation/qemu-vm.nix
@@ -57,7 +57,7 @@ let
           -name ${vmName} \
           -m ${toString config.virtualisation.memorySize} \
           ${optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} \
-          ${concatStringsSep " " config.virtualisation.qemuNetworkingOptions} \
+          ${concatStringsSep " " config.virtualisation.qemu.networkingOptions} \
           -virtfs local,path=/nix/store,security_model=none,mount_tag=store \
           -virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \
           -virtfs local,path=''${SHARED_DIR:-$TMPDIR/xchg},security_model=none,mount_tag=shared \
@@ -179,23 +179,6 @@ in
           '';
       };
 
-    virtualisation.qemuNetworkingOptions =
-      mkOption {
-        default = [
-          "-net nic,vlan=0,model=virtio"
-          "-net user,vlan=0\${QEMU_NET_OPTS:+,$QEMU_NET_OPTS}"
-        ];
-        type = types.listOf types.str;
-        description = ''
-          Networking-related command-line options that should be passed to qemu.
-          The default is to use userspace networking (slirp).
-
-          If you override this option, be adviced to keep
-          ''${QEMU_NET_OPTS:+,$QEMU_NET_OPTS} (as seen in the default)
-          to keep the default runtime behaviour.
-        '';
-      };
-
     virtualisation.graphics =
       mkOption {
         default = true;
@@ -264,12 +247,31 @@ in
         description = "Primary IP address used in /etc/hosts.";
       };
 
-    virtualisation.qemu.options =
-      mkOption {
-        default = [];
-        example = [ "-vga std" ];
-        description = "Options passed to QEMU.";
-      };
+    virtualisation.qemu = {
+      options =
+        mkOption {
+          default = [];
+          example = [ "-vga std" ];
+          description = "Options passed to QEMU.";
+        };
+
+      networkingOptions =
+        mkOption {
+          default = [
+            "-net nic,vlan=0,model=virtio"
+            "-net user,vlan=0\${QEMU_NET_OPTS:+,$QEMU_NET_OPTS}"
+          ];
+          type = types.listOf types.str;
+          description = ''
+            Networking-related command-line options that should be passed to qemu.
+            The default is to use userspace networking (slirp).
+
+            If you override this option, be adviced to keep
+            ''${QEMU_NET_OPTS:+,$QEMU_NET_OPTS} (as seen in the default)
+            to keep the default runtime behaviour.
+          '';
+        };
+    };
 
     virtualisation.useBootLoader =
       mkOption {