diff options
author | Nadrieril <nadrieril@gmail.com> | 2018-01-19 23:56:44 +0000 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2018-11-15 16:49:38 +0000 |
commit | 99a8c45bdde5c59f5a7a7b7d57813f20fbb70a92 (patch) | |
tree | 2909a6993b2a6034246715bbdcdd9a6a463a396f /nixos/modules/hardware/ckb-next.nix | |
parent | c48411a404a116e6f31948374fd94b3645af0f3a (diff) |
nixos/ckb: Add option to restrict access to the devices to a particular group
fixes #34064
Diffstat (limited to 'nixos/modules/hardware/ckb-next.nix')
-rw-r--r-- | nixos/modules/hardware/ckb-next.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/modules/hardware/ckb-next.nix b/nixos/modules/hardware/ckb-next.nix index a275fb8fd6049..20b2756d8b266 100644 --- a/nixos/modules/hardware/ckb-next.nix +++ b/nixos/modules/hardware/ckb-next.nix @@ -10,6 +10,15 @@ in options.hardware.ckb-next = { enable = mkEnableOption "the Corsair keyboard/mouse driver"; + gid = mkOption { + type = types.nullOr types.int; + default = null; + example = 100; + description = '' + Limit access to the ckb daemon to a particular group. + ''; + }; + package = mkOption { type = types.package; default = pkgs.ckb-next; @@ -26,8 +35,8 @@ in systemd.services.ckb-next = { description = "Corsair Keyboards and Mice Daemon"; wantedBy = ["multi-user.target"]; - script = "exec ${cfg.package}/bin/ckb-next-daemon"; serviceConfig = { + ExecStart = "${cfg.package}/bin/ckb-next-daemon ${optionalString (cfg.gid != null) "--gid=${builtins.toString cfg.gid}"}"; Restart = "on-failure"; StandardOutput = "syslog"; }; |