diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2015-05-20 09:51:42 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2015-05-20 12:14:18 +0200 |
commit | 3d2d78cb396a5a3fe144b15207069bb11775ff9c (patch) | |
tree | 6e94400a2f658fe105621a0940b5c86b25d663b3 /nixos/modules/virtualisation | |
parent | f247481b5dc10a25970f4a44b66628166e56f4b9 (diff) |
nixos/libvirtd: add 'extraOptions' option
And move the '--verbose' flag to extraOptions, so that users can easily disable it.
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/libvirtd.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix index 7410609e0642c..14c4e992d3b6f 100644 --- a/nixos/modules/virtualisation/libvirtd.nix +++ b/nixos/modules/virtualisation/libvirtd.nix @@ -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 |