1 { config, lib, pkgs, ... }:
7 cfg = config.services.gpm;
22 description = lib.mdDoc ''
23 Whether to enable GPM, the General Purpose Mouse daemon,
24 which enables mouse support in virtual consoles.
31 description = lib.mdDoc "Mouse protocol to use.";
41 config = mkIf cfg.enable {
43 systemd.services.gpm =
44 { description = "Console Mouse Daemon";
46 wantedBy = [ "multi-user.target" ];
47 requires = [ "dev-input-mice.device" ];
48 after = [ "dev-input-mice.device" ];
50 serviceConfig.ExecStart = "@${pkgs.gpm}/sbin/gpm gpm -m /dev/input/mice -t ${cfg.protocol}";
51 serviceConfig.Type = "forking";
52 serviceConfig.PIDFile = "/run/gpm.pid";