mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
parent
ba267839d1
commit
1d64f5f41b
@ -13,6 +13,9 @@ let
|
||||
auth_unix_rw = "none"
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
qemuConfigFile = pkgs.writeText "qemu.conf" ''
|
||||
${cfg.qemuVerbatimConfig}
|
||||
'';
|
||||
|
||||
in {
|
||||
|
||||
@ -48,6 +51,18 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
virtualisation.libvirtd.qemuVerbatimConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = ''
|
||||
namespaces = []
|
||||
'';
|
||||
description = ''
|
||||
Contents written to the qemu configuration file, qemu.conf.
|
||||
Make sure to include a proper namespace configuration when
|
||||
supplying custom configuration.
|
||||
'';
|
||||
};
|
||||
|
||||
virtualisation.libvirtd.extraOptions = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
@ -119,6 +134,9 @@ in {
|
||||
cp -npd ${pkgs.libvirt}/var/lib/$i /var/lib/$i
|
||||
done
|
||||
|
||||
# Copy generated qemu config to libvirt directory
|
||||
cp -f ${qemuConfigFile} /var/lib/libvirt/qemu.conf
|
||||
|
||||
# libvirtd puts the full path of the emulator binary in the machine
|
||||
# config file. But this path can unfortunately be garbage collected
|
||||
# while still being used by the virtual machine. So update the
|
||||
|
Loading…
Reference in New Issue
Block a user