nixpkgs/nixos/modules/services/misc/spice-vdagentd.nix

31 lines
627 B
Nix
Raw Normal View History

{ 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 22:37:56 +01:00
mkdir -p "/run/spice-vdagentd/"
'';
serviceConfig = {
Type = "forking";
ExecStart = "${pkgs.spice-vdagent}/bin/spice-vdagentd";
};
};
};
}