nixpkgs/nixos/modules/services/hardware/bluetooth.nix
Graham Christensen b1a05a0865
nixos: drop references to kde4
Excluding modules/programs/environment.nix for PATHand QT_PLUGIN_PATH to allow the programs to continue running.
2017-02-11 14:01:13 -05:00

46 lines
824 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
bluez-bluetooth = pkgs.bluez;
in
{
###### interface
options = {
hardware.bluetooth.enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable support for Bluetooth.";
};
};
###### implementation
config = mkIf config.hardware.bluetooth.enable {
environment.systemPackages = [ bluez-bluetooth pkgs.openobex pkgs.obexftp ];
services.udev.packages = [ bluez-bluetooth ];
services.dbus.packages = [ bluez-bluetooth ];
systemd.packages = [ bluez-bluetooth ];
systemd.services.bluetooth = {
wantedBy = [ "bluetooth.target" ];
aliases = [ "dbus-org.bluez.service" ];
};
systemd.user.services.obex = {
aliases = [ "dbus-org.bluez.obex.service" ];
};
};
}