at 18.09-beta 663 B view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4 5let 6 cfg = config.hardware.digitalbitbox; 7in 8 9{ 10 options.hardware.digitalbitbox = { 11 enable = mkOption { 12 type = types.bool; 13 default = false; 14 description = '' 15 Enables udev rules for Digital Bitbox devices. 16 ''; 17 }; 18 19 package = mkOption { 20 type = types.package; 21 default = pkgs.digitalbitbox; 22 defaultText = "pkgs.digitalbitbox"; 23 description = "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults."; 24 }; 25 }; 26 27 config = mkIf cfg.enable { 28 services.udev.packages = [ cfg.package ]; 29 }; 30}