From 02b936189cb9cc5c2e33eae686bd95ccb2995196 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 18 Apr 2014 18:45:20 +0200 Subject: Improve gpm service --- nixos/modules/services/ttys/gpm.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'nixos/modules/services/ttys') diff --git a/nixos/modules/services/ttys/gpm.nix b/nixos/modules/services/ttys/gpm.nix index 12fe4e2f84f1..eda062494288 100644 --- a/nixos/modules/services/ttys/gpm.nix +++ b/nixos/modules/services/ttys/gpm.nix @@ -40,12 +40,15 @@ in config = mkIf cfg.enable { - jobs.gpm = - { description = "General purpose mouse"; + systemd.services.gpm = + { description = "Console Mouse Daemon"; - startOn = "started udev"; + wantedBy = [ "multi-user.target" ]; + after = [ "systemd-udev-settle.service" ]; - exec = "${pkgs.gpm}/sbin/gpm -m /dev/input/mice -t ${cfg.protocol} -D &>/dev/null"; + serviceConfig.ExecStart = "@${pkgs.gpm}/sbin/gpm gpm -m /dev/input/mice -t ${cfg.protocol}"; + serviceConfig.Type = "forking"; + serviceConfig.PIDFile = "/run/gpm.pid"; }; }; -- cgit 1.4.1