2018-02-27 23:40:22 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.hardware.digitalbitbox;
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
options.hardware.digitalbitbox = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Enables udev rules for Digital Bitbox devices.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.digitalbitbox;
|
2021-10-03 18:06:03 +02:00
|
|
|
defaultText = literalExpression "pkgs.digitalbitbox";
|
2018-02-27 23:40:22 +01:00
|
|
|
description = "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.udev.packages = [ cfg.package ];
|
|
|
|
};
|
|
|
|
}
|