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.
This commit is contained in:
Yarny0 2019-05-13 16:27:06 +02:00
parent 8b6f54f007
commit b38bdf6d2f
2 changed files with 22 additions and 0 deletions

View file

@ -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

View file

@ -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 ];
}