nixpkgs/modules/services/hardware/upower.nix
Eelco Dolstra 2e4acbcf8b * Add a NixOS module for upower.
svn path=/nixos/trunk/; revision=27931
2011-07-25 00:45:52 +00:00

39 lines
545 B
Nix

# 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 ];
};
}