xen service: Add the possibility to override configuration of xendomains

Add the option virtualisation.xen.domain.extraConfig, which
allows overriding options passed to xendomains.
This commit is contained in:
Michał Pałka 2017-05-04 08:31:40 +00:00
parent f556d94527
commit 3b0daa1a28

View File

@ -111,6 +111,19 @@ in
''; '';
}; };
virtualisation.xen.domains = {
extraConfig = mkOption {
type = types.string;
default = "";
description =
''
Options defined here will override the defaults for xendomains.
The default options can be seen in the file included from
/etc/default/xendomains.
'';
};
};
virtualisation.xen.trace = virtualisation.xen.trace =
mkOption { mkOption {
default = false; default = false;
@ -216,7 +229,11 @@ in
{ source = "${cfg.package}/etc/xen/scripts"; { source = "${cfg.package}/etc/xen/scripts";
target = "xen/scripts"; target = "xen/scripts";
} }
{ source = "${cfg.package}/etc/default/xendomains"; { text = ''
source ${cfg.package}/etc/default/xendomains
${cfg.domains.extraConfig}
'';
target = "default/xendomains"; target = "default/xendomains";
} }
]; ];