Added gpm service

svn path=/nixos/trunk/; revision=11952
This commit is contained in:
Michael Raskin 2008-06-03 07:06:35 +00:00
parent da13d7ed13
commit eff945115b
3 changed files with 38 additions and 0 deletions

@ -2024,6 +2024,21 @@
};
};
gpm = {
enable = mkOption {
default = false;
description = "
Whether to enable general purpose mouse daemon.
";
};
protocol = mkOption {
default = "ps/2";
description = "
Mouse protocol to use.
";
};
};
};
installer = {

@ -365,6 +365,12 @@ let
inherit (pkgs) stdenv hal;
})
++ optional config.services.gpm.enable
(import ../upstart-jobs/gpm.nix {
inherit (pkgs) gpm;
gpmConfig = config.services.gpm;
})
# Nagios system/network monitoring daemon.
++ optional config.services.nagios.enable
(import ../upstart-jobs/nagios {

17
upstart-jobs/gpm.nix Normal file

@ -0,0 +1,17 @@
{gpm, gpmConfig}:
let
gpmBin = "${gpm}/sbin/gpm";
in
{
name = "gpm";
job = ''
description = "General purpose mouse"
start on udev
stop on shutdown
respawn ${gpmBin} -m /dev/input/mice -t ${gpmConfig.protocol} -D &>/dev/null
'';
}