nixos/qemu-guest-agent: make the QEMU guest agent package configurable

This commit is contained in:
Andreas Rammhold 2020-10-19 17:58:10 +02:00
parent 2451796b49
commit e127ba7873
No known key found for this signature in database
GPG Key ID: E432E410B5E48C86

View File

@ -12,6 +12,11 @@ in {
default = false;
description = "Whether to enable the qemu guest agent.";
};
package = mkOption {
type = types.package;
default = pkgs.qemu.ga;
description = "The QEMU guest agent package.";
};
};
config = mkIf cfg.enable (
@ -25,7 +30,7 @@ in {
systemd.services.qemu-guest-agent = {
description = "Run the QEMU Guest Agent";
serviceConfig = {
ExecStart = "${pkgs.qemu.ga}/bin/qemu-ga";
ExecStart = "${cfg.package}/bin/qemu-ga";
Restart = "always";
RestartSec = 0;
};