tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
nixos/hardware/ubertooth: init at 2018-12-R1
Alvar Penning
5 years ago
dc0552b0
623c10ac
+34
-2
3 changed files
expand all
collapse all
unified
split
nixos
modules
hardware
ubertooth.nix
module-list.nix
pkgs
applications
radio
ubertooth
default.nix
+29
nixos/modules/hardware/ubertooth.nix
···
1
1
+
{ config, lib, pkgs, ... }:
2
2
+
3
3
+
with lib;
4
4
+
5
5
+
let
6
6
+
cfg = config.hardware.ubertooth;
7
7
+
8
8
+
ubertoothPkg = pkgs.ubertooth.override {
9
9
+
udevGroup = cfg.group;
10
10
+
};
11
11
+
in {
12
12
+
options.hardware.ubertooth = {
13
13
+
enable = mkEnableOption "Enable the Ubertooth software and its udev rules.";
14
14
+
15
15
+
group = mkOption {
16
16
+
type = types.str;
17
17
+
default = "ubertooth";
18
18
+
example = "wheel";
19
19
+
description = "Group for Ubertooth's udev rules.";
20
20
+
};
21
21
+
};
22
22
+
23
23
+
config = mkIf cfg.enable {
24
24
+
environment.systemPackages = [ ubertoothPkg ];
25
25
+
26
26
+
services.udev.packages = [ ubertoothPkg ];
27
27
+
users.groups.${cfg.group} = {};
28
28
+
};
29
29
+
}
+1
nixos/modules/module-list.nix
···
64
64
./hardware/steam-hardware.nix
65
65
./hardware/system-76.nix
66
66
./hardware/tuxedo-keyboard.nix
67
67
+
./hardware/ubertooth.nix
67
68
./hardware/usb-wwan.nix
68
69
./hardware/onlykey.nix
69
70
./hardware/opentabletdriver.nix
+4
-2
pkgs/applications/radio/ubertooth/default.nix
···
1
1
-
{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, libbtbb, libpcap , libusb1, bluez }:
1
1
+
{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, libbtbb, libpcap , libusb1, bluez
2
2
+
, udevGroup ? "ubertooth"
3
3
+
}:
2
4
3
5
stdenv.mkDerivation rec {
4
6
pname = "ubertooth";
···
19
21
cmakeFlags = lib.optionals stdenv.isLinux [
20
22
"-DINSTALL_UDEV_RULES=TRUE"
21
23
"-DUDEV_RULES_PATH=etc/udev/rules.d"
22
22
-
"-DUDEV_RULES_GROUP=ubertooth"
24
24
+
"-DUDEV_RULES_GROUP=${udevGroup}"
23
25
];
24
26
25
27
meta = with stdenv.lib; {