nixos/libvirtd: add 'extraOptions' option
And move the '--verbose' flag to extraOptions, so that users can easily disable it.
This commit is contained in:
parent
f247481b5d
commit
3d2d78cb39
|
@ -57,6 +57,17 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
virtualisation.libvirtd.extraOptions =
|
||||||
|
mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [ "--verbose" ]; # for historical reasons, should be empty
|
||||||
|
example = [ "--verbose" ];
|
||||||
|
description =
|
||||||
|
''
|
||||||
|
Extra command line arguments passed to libvirtd on startup.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
virtualisation.libvirtd.onShutdown =
|
virtualisation.libvirtd.onShutdown =
|
||||||
mkOption {
|
mkOption {
|
||||||
type = types.enum ["shutdown" "suspend" ];
|
type = types.enum ["shutdown" "suspend" ];
|
||||||
|
@ -140,7 +151,7 @@ in
|
||||||
done
|
done
|
||||||
''; # */
|
''; # */
|
||||||
|
|
||||||
serviceConfig.ExecStart = ''@${pkgs.libvirt}/sbin/libvirtd libvirtd --config "${configFile}" --daemon --verbose'';
|
serviceConfig.ExecStart = ''@${pkgs.libvirt}/sbin/libvirtd libvirtd --config "${configFile}" --daemon ${concatStringsSep " " cfg.extraOptions}'';
|
||||||
serviceConfig.Type = "forking";
|
serviceConfig.Type = "forking";
|
||||||
serviceConfig.KillMode = "process"; # when stopping, leave the VMs alone
|
serviceConfig.KillMode = "process"; # when stopping, leave the VMs alone
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue