Added gpm service
svn path=/nixos/trunk/; revision=11952
This commit is contained in:
parent
da13d7ed13
commit
eff945115b
@ -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
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
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user