mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
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
1 changed files with 12 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue