summary refs log tree commit diff
path: root/nixos/modules/services/misc/spice-vdagentd.nix
diff options
context:
space:
mode:
authorAdam Boseley <adam.boseley@gmail.com>2015-11-05 21:39:55 +1000
committerAdam Boseley <adam.boseley@gmail.com>2016-03-05 07:56:47 +1000
commit5b83791207d1521dde3a6f7f4f70d730571668a4 (patch)
tree20d1585922905303b85a4c2481382d7ea99efe74 /nixos/modules/services/misc/spice-vdagentd.nix
parent798a14d22cc3e3c9f83b2c05f417c2cdfc0f5a44 (diff)
downloadnixpkgs-5b83791207d1521dde3a6f7f4f70d730571668a4.tar
nixpkgs-5b83791207d1521dde3a6f7f4f70d730571668a4.tar.gz
nixpkgs-5b83791207d1521dde3a6f7f4f70d730571668a4.tar.bz2
nixpkgs-5b83791207d1521dde3a6f7f4f70d730571668a4.tar.lz
nixpkgs-5b83791207d1521dde3a6f7f4f70d730571668a4.tar.xz
nixpkgs-5b83791207d1521dde3a6f7f4f70d730571668a4.tar.zst
nixpkgs-5b83791207d1521dde3a6f7f4f70d730571668a4.zip
spice-vdagentd service : initial at 0.16.0
Diffstat (limited to 'nixos/modules/services/misc/spice-vdagentd.nix')
-rw-r--r--nixos/modules/services/misc/spice-vdagentd.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/spice-vdagentd.nix b/nixos/modules/services/misc/spice-vdagentd.nix
new file mode 100644
index 00000000000..f8133394ffd
--- /dev/null
+++ b/nixos/modules/services/misc/spice-vdagentd.nix
@@ -0,0 +1,30 @@
+{ 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 = ''
+        mkdir -p "/var/run/spice-vdagentd/"
+      '';
+      serviceConfig = {
+        Type = "forking";
+        ExecStart = "/bin/sh -c '${pkgs.spice-vdagent}/bin/spice-vdagentd'";
+      };
+    };
+  };
+}