2015-11-05 11:39:55 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.spice-vdagentd;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
services.spice-vdagentd = {
|
2022-08-28 20:18:44 +01:00
|
|
|
enable = mkEnableOption (lib.mdDoc "Spice guest vdagent daemon");
|
2015-11-05 11:39:55 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
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 15:28:25 +01:00
|
|
|
ExecStart = "${pkgs.spice-vdagent}/bin/spice-vdagentd";
|
2015-11-05 11:39:55 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|