2018-02-27 22:40:22 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.digitalbitbox;
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
options.programs.digitalbitbox = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2022-07-28 21:19:15 +00:00
|
|
|
description = lib.mdDoc ''
|
2018-02-27 22:40:22 +00:00
|
|
|
Installs the Digital Bitbox application and enables the complementary hardware module.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.digitalbitbox;
|
2021-10-03 16:06:03 +00:00
|
|
|
defaultText = literalExpression "pkgs.digitalbitbox";
|
2022-07-28 21:19:15 +00:00
|
|
|
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.";
|
2018-02-27 22:40:22 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
hardware.digitalbitbox = {
|
|
|
|
enable = true;
|
|
|
|
package = cfg.package;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
doc = ./doc.xml;
|
2018-07-09 04:37:52 +00:00
|
|
|
maintainers = with lib.maintainers; [ vidbina ];
|
2018-02-27 22:40:22 +00:00
|
|
|
};
|
|
|
|
}
|