diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-10-12 16:36:19 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-10-12 16:36:19 +0000 |
commit | e91d882a946fc736f62235296e77c139cee7d9b3 (patch) | |
tree | e220488319f0cc28aafb01ca26809429eeaf7f82 /modules/services/ttys | |
parent | 4a78ef25e73da292d060a2afde0c00980a22b2ac (diff) | |
download | nixlib-e91d882a946fc736f62235296e77c139cee7d9b3.tar nixlib-e91d882a946fc736f62235296e77c139cee7d9b3.tar.gz nixlib-e91d882a946fc736f62235296e77c139cee7d9b3.tar.bz2 nixlib-e91d882a946fc736f62235296e77c139cee7d9b3.tar.lz nixlib-e91d882a946fc736f62235296e77c139cee7d9b3.tar.xz nixlib-e91d882a946fc736f62235296e77c139cee7d9b3.tar.zst nixlib-e91d882a946fc736f62235296e77c139cee7d9b3.zip |
* Converted modules that were still using the old (concrete syntax)
style of declaring Upstart jobs. While at it, converted them to the current NixOS module style and improved some option descriptions. Hopefully I didn't break too much :-) svn path=/nixos/trunk/; revision=17761
Diffstat (limited to 'modules/services/ttys')
-rw-r--r-- | modules/services/ttys/gpm.nix | 80 |
1 files changed, 37 insertions, 43 deletions
diff --git a/modules/services/ttys/gpm.nix b/modules/services/ttys/gpm.nix index 35ecab0083d3..fdc1db2878ce 100644 --- a/modules/services/ttys/gpm.nix +++ b/modules/services/ttys/gpm.nix @@ -1,58 +1,52 @@ -{pkgs, config, ...}: +{ config, pkgs, ... }: + +with pkgs.lib; -###### interface let - inherit (pkgs.lib) mkOption; + + cfg = config.services.gpm; + +in + +{ + + ###### interface options = { - services = { - gpm = { - enable = mkOption { - default = false; - description = " - Whether to enable general purpose mouse daemon. - "; - }; - protocol = mkOption { - default = "ps/2"; - description = " - Mouse protocol to use. - "; - }; + + services.gpm = { + + enable = mkOption { + default = false; + description = '' + Whether to enable GPM, the General Purpose Mouse daemon, + which enables mouse support in virtual consoles. + ''; }; + + protocol = mkOption { + default = "ps/2"; + description = "Mouse protocol to use."; + }; + }; + }; -in + -###### implementation -let - cfg = config.services.gpm; - inherit (pkgs.lib) mkIf; + ###### implementation - gpm = pkgs.gpm; - gpmBin = "${gpm}/sbin/gpm"; + config = mkIf cfg.enable { - job = { - name = "gpm"; - job = '' - description = "General purpose mouse" + jobAttrs.gpm = + { description = "General purpose mouse"; - start on udev - stop on shutdown + startOn = "udev"; + stopOn = "shutdown"; - respawn ${gpmBin} -m /dev/input/mice -t ${cfg.protocol} -D &>/dev/null - ''; - }; -in - -mkIf cfg.enable { - require = [ - # ../upstart-jobs/default.nix # config.services.extraJobs - # /etc/security/console.perms (should be generated ?) - options - ]; + exec = "${pkgs.gpm}/sbin/gpm -m /dev/input/mice -t ${cfg.protocol} -D &>/dev/null"; + }; - services = { - extraJobs = [job]; }; + } |