2018-02-27 22:40:22 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.hardware.digitalbitbox;
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
options.hardware.digitalbitbox = {
|
2024-08-24 20:05:27 +00:00
|
|
|
enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
2018-02-27 22:40:22 +00:00
|
|
|
default = false;
|
2024-04-13 12:54:15 +00:00
|
|
|
description = ''
|
2018-02-27 22:40:22 +00:00
|
|
|
Enables udev rules for Digital Bitbox devices.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-08-24 20:05:27 +00:00
|
|
|
package = lib.mkPackageOption pkgs "digitalbitbox" {
|
2023-11-27 00:19:27 +00:00
|
|
|
extraDescription = ''
|
|
|
|
This can be used to install a package with udev rules that differ from the defaults.
|
|
|
|
'';
|
2018-02-27 22:40:22 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-08-24 20:05:27 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2018-02-27 22:40:22 +00:00
|
|
|
services.udev.packages = [ cfg.package ];
|
|
|
|
};
|
|
|
|
}
|