summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorYarny0 <41838844+Yarny0@users.noreply.github.com>2019-05-13 16:27:06 +0200
committerYarny0 <41838844+Yarny0@users.noreply.github.com>2019-05-30 19:58:45 +0200
commitb38bdf6d2fadc3305bf6c967b42e5282a4e92433 (patch)
treee6782437d700cf36d7ddd3244f861ee36becf72c /nixos
parent8b6f54f0070ce2f556fe025f5efdc945177144d0 (diff)
downloadnixpkgs-b38bdf6d2fadc3305bf6c967b42e5282a4e92433.tar
nixpkgs-b38bdf6d2fadc3305bf6c967b42e5282a4e92433.tar.gz
nixpkgs-b38bdf6d2fadc3305bf6c967b42e5282a4e92433.tar.bz2
nixpkgs-b38bdf6d2fadc3305bf6c967b42e5282a4e92433.tar.lz
nixpkgs-b38bdf6d2fadc3305bf6c967b42e5282a4e92433.tar.xz
nixpkgs-b38bdf6d2fadc3305bf6c967b42e5282a4e92433.tar.zst
nixpkgs-b38bdf6d2fadc3305bf6c967b42e5282a4e92433.zip
nixos/clickshare: init module
The clickshare-csc1 package brings a udev rule file
to grant access to the ClickShare dongle if connected.
This module provides an option to install that rule file.
Only users in the "clickshare" users group have access.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/programs/clickshare.nix21
2 files changed, 22 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index bc8bcc0cd8f..c5634fae92c 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -94,6 +94,7 @@
   ./programs/ccache.nix
   ./programs/cdemu.nix
   ./programs/chromium.nix
+  ./programs/clickshare.nix
   ./programs/command-not-found/command-not-found.nix
   ./programs/criu.nix
   ./programs/dconf.nix
diff --git a/nixos/modules/programs/clickshare.nix b/nixos/modules/programs/clickshare.nix
new file mode 100644
index 00000000000..9980a7daf52
--- /dev/null
+++ b/nixos/modules/programs/clickshare.nix
@@ -0,0 +1,21 @@
+{ config, lib, pkgs, ... }:
+
+{
+
+  options.programs.clickshare-csc1.enable =
+    lib.options.mkEnableOption ''
+      Barco ClickShare CSC-1 driver/client.
+      This allows users in the <literal>clickshare</literal>
+      group to access and use a ClickShare USB dongle
+      that is connected to the machine
+    '';
+
+  config = lib.modules.mkIf config.programs.clickshare-csc1.enable {
+    environment.systemPackages = [ pkgs.clickshare-csc1 ];
+    services.udev.packages = [ pkgs.clickshare-csc1 ];
+    users.groups.clickshare = {};
+  };
+
+  meta.maintainers = [ lib.maintainers.yarny ];
+
+}