* Add a NixOS module for upower.

svn path=/nixos/trunk/; revision=27931
This commit is contained in:
Eelco Dolstra 2011-07-25 00:45:52 +00:00
parent fcc9cf2d85
commit 2e4acbcf8b
3 changed files with 41 additions and 2 deletions

View file

@ -64,6 +64,7 @@
./services/hardware/bluetooth.nix
./services/hardware/hal.nix
./services/hardware/udisks.nix
./services/hardware/upower.nix
./services/hardware/pcscd.nix
./services/hardware/udev.nix
./services/logging/klogd.nix

View file

@ -15,8 +15,8 @@ with pkgs.lib;
enable = mkOption {
default = false;
description = ''
Whether to enable support for Udisks, a DBus service that
allows applications to query and manipulate storage devices.
Whether to enable Udisks, a DBus service that allows
applications to query and manipulate storage devices.
'';
};

View file

@ -0,0 +1,38 @@
# Upower daemon.
{ config, pkgs, ... }:
with pkgs.lib;
{
###### interface
options = {
services.upower = {
enable = mkOption {
default = false;
description = ''
Whether to enable Upower, a DBus service that provides power
management support to applications.
'';
};
};
};
###### implementation
config = mkIf config.services.upower.enable {
environment.systemPackages = [ pkgs.upower ];
services.dbus.packages = [ pkgs.upower ];
};
}