2010-08-27 17:32:49 +02:00
|
|
|
{ config, pkgs, ... }:
|
2009-08-10 20:25:09 +02:00
|
|
|
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
2010-08-27 17:32:49 +02:00
|
|
|
|
|
|
|
hardware.bluetooth.enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "Whether to enable support for Bluetooth.";
|
|
|
|
};
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2009-08-10 20:25:09 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2010-08-27 17:32:49 +02:00
|
|
|
config = mkIf config.hardware.bluetooth.enable {
|
|
|
|
|
|
|
|
environment.systemPackages = [ pkgs.bluez pkgs.openobex pkgs.obexftp ];
|
2009-08-10 20:25:09 +02:00
|
|
|
|
2010-08-27 17:32:49 +02:00
|
|
|
services.udev.packages = [ pkgs.bluez ];
|
2009-08-10 20:25:09 +02:00
|
|
|
|
2010-08-27 17:32:49 +02:00
|
|
|
services.dbus.packages = [ pkgs.bluez ];
|
2011-09-14 20:20:50 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2009-08-10 20:25:09 +02:00
|
|
|
}
|