2015-11-05 11:39:55 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.spice-vdagentd;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
services.spice-vdagentd = {
|
|
|
|
enable = mkEnableOption "Spice guest vdagent daemon";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
environment.systemPackages = [ pkgs.spice-vdagent ];
|
|
|
|
|
|
|
|
systemd.services.spice-vdagentd = {
|
|
|
|
description = "spice-vdagent daemon";
|
|
|
|
wantedBy = [ "graphical.target" ];
|
|
|
|
preStart = ''
|
2018-12-19 21:37:56 +00:00
|
|
|
mkdir -p "/run/spice-vdagentd/"
|
2015-11-05 11:39:55 +00:00
|
|
|
'';
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "forking";
|
2017-07-14 14:28:25 +00:00
|
|
|
ExecStart = "${pkgs.spice-vdagent}/bin/spice-vdagentd";
|
2015-11-05 11:39:55 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|