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 =
|
||||
mkOption {
|
||||
type = types.enum ["shutdown" "suspend" ];
|
||||
|
@ -140,7 +151,7 @@ in
|
|||
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.KillMode = "process"; # when stopping, leave the VMs alone
|
||||
|
||||
|
|
Loading…
Reference in New Issue