02cf88bb76
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
30 lines
701 B
Nix
30 lines
701 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.hardware.digitalbitbox;
|
|
in
|
|
|
|
{
|
|
options.hardware.digitalbitbox = {
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = lib.mdDoc ''
|
|
Enables udev rules for Digital Bitbox devices.
|
|
'';
|
|
};
|
|
|
|
package = mkOption {
|
|
type = types.package;
|
|
default = pkgs.digitalbitbox;
|
|
defaultText = literalExpression "pkgs.digitalbitbox";
|
|
description = lib.mdDoc "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 ];
|
|
};
|
|
}
|