1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-14 08:34:50 +00:00
nixpkgs/modules/services/system/consolekit.nix
Eelco Dolstra 5ebdee3577 * Continued refactoring the tree: moved most Upstart jobs (namely
those that run daemons) to modules/services.  This probably broke
  some things since there are a few relative paths in modules
  (e.g. imports of system/ids.nix).
* Moved some PAM modules out of etc/pam.d to the directories of NixOS
  modules that use them.

svn path=/nixos/branches/modular-nixos/; revision=15717
2009-05-24 23:13:23 +00:00

60 lines
911 B
Nix

{pkgs, config, ...}:
###### interface
let
inherit (pkgs.lib) mkOption;
options = {
services = {
consolekit = {
enable = mkOption {
default = false;
description = "
Whether to start the ConsoleKit daemon.
";
};
};
};
};
in
###### implementation
let
cfg = config.services.consolekit;
inherit (pkgs.lib) mkIf;
inherit (pkgs) ConsoleKit;
job = {
name = "consolekit";
job = ''
description "Console Kit Service"
start on dbus
stop on shutdown
respawn ${ConsoleKit}/sbin/console-kit-daemon
'';
};
in
mkIf cfg.enable {
require = [
#../upstart-jobs/default.nix # config.services.extraJobs
#../upstart-jobs/dbus.nix # services.dbus.*
options
];
services = {
extraJobs = [job];
dbus = {
enable = true;
services = [ConsoleKit];
};
};
}