Author: eelco
Date: Mon Jul 25 00:45:52 2011
New Revision: 27931
URL: https://svn.nixos.org/websvn/nix/?rev=27931&sc=1

Log:
* Add a NixOS module for upower.

Added:
   nixos/trunk/modules/services/hardware/upower.nix
Modified:
   nixos/trunk/modules/module-list.nix
   nixos/trunk/modules/services/hardware/udisks.nix

Modified: nixos/trunk/modules/module-list.nix
==============================================================================
--- nixos/trunk/modules/module-list.nix Mon Jul 25 00:36:41 2011        (r27930)
+++ nixos/trunk/modules/module-list.nix Mon Jul 25 00:45:52 2011        (r27931)
@@ -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

Modified: nixos/trunk/modules/services/hardware/udisks.nix
==============================================================================
--- nixos/trunk/modules/services/hardware/udisks.nix    Mon Jul 25 00:36:41 
2011        (r27930)
+++ nixos/trunk/modules/services/hardware/udisks.nix    Mon Jul 25 00:45:52 
2011        (r27931)
@@ -15,8 +15,8 @@
       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.
         '';
       };
 

Added: nixos/trunk/modules/services/hardware/upower.nix
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixos/trunk/modules/services/hardware/upower.nix    Mon Jul 25 00:45:52 
2011        (r27931)
@@ -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 ];
+
+  };
+
+}
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to