* Add a NixOS module for upower.
svn path=/nixos/trunk/; revision=27931
This commit is contained in:
parent
fcc9cf2d85
commit
2e4acbcf8b
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -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 ];
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue