summary refs log tree commit diff
path: root/nixos/modules/hardware
diff options
context:
space:
mode:
authorDavid Asabina <as@bina.me>2018-02-27 23:40:22 +0100
committerJörg Thalheim <Mic92@users.noreply.github.com>2018-02-27 22:40:22 +0000
commite41ca3b34767cc13d4e990f6b005360b433d88ca (patch)
tree25a9ee097a58c93b449272dcf303a6a8c35cc1e6 /nixos/modules/hardware
parente21057ae4fd7f210047066d0474c194b072b49a0 (diff)
downloadnixlib-e41ca3b34767cc13d4e990f6b005360b433d88ca.tar
nixlib-e41ca3b34767cc13d4e990f6b005360b433d88ca.tar.gz
nixlib-e41ca3b34767cc13d4e990f6b005360b433d88ca.tar.bz2
nixlib-e41ca3b34767cc13d4e990f6b005360b433d88ca.tar.lz
nixlib-e41ca3b34767cc13d4e990f6b005360b433d88ca.tar.xz
nixlib-e41ca3b34767cc13d4e990f6b005360b433d88ca.tar.zst
nixlib-e41ca3b34767cc13d4e990f6b005360b433d88ca.zip
digitalbitbox: init at 2.2.2 (#33787)
* digitalbitbox: init at 2.2.2

The commits that lead to this have been squashed from independent
commits see branch @vidbina/add/digitalbitbox-wip that did the
following:
 - 0a3030fa0ec digitalbitbox: init at 2.2.2
 - c18ffa3ffd4 digitalbitbox: moved meta to EOF
 - 0c5f3d6972a digitalbitbox: using preConfigure + configureFlags
 - a85b1dfc3fd digitalbitbox: nativeBuildInputs
 - 90bdd35ef0f digitalbitbox: autoreconfHook
 - 91810eea055 digitalbitbox: default installPhase & makeWrapper
 - 90e43fb7e2a digitalbitbox: doc rm $PWD hack & printf-tee deal
 - fd033b2fe5a digitalbitbox: cleanup, alphabetically sort attrs
 - c5907982db3 digitalbitbox: added hardware module
 - 88e46bc9ae0 digitalbitbox: added program module
 - amend to change name: dbb-app -> digitalbitbox
 - amend to add install instructions based on feedback
 (https://github.com/NixOS/nixpkgs/pull/33787#issuecomment-362813149)
 - amend to add longDescription
 - moved program to its own dir
 - overridable udev rules handling
 - added docs to manual
 - added package attr to program module
 - added package attr to hardware module

* digitalbitbox: use libsForQt5.callPackage
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r--nixos/modules/hardware/digitalbitbox.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixos/modules/hardware/digitalbitbox.nix b/nixos/modules/hardware/digitalbitbox.nix
new file mode 100644
index 000000000000..0888cfbef2a8
--- /dev/null
+++ b/nixos/modules/hardware/digitalbitbox.nix
@@ -0,0 +1,30 @@
+{ 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;
+      defaultText = "pkgs.digitalbitbox";
+      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 ];
+  };
+}