Unverified Commit cc76cf58 authored by h7x4's avatar h7x4 Committed by GitHub
Browse files

nixos/uinput: set a static GID for the uinput group (#333762)

parents ddbf80e9 70119aa6
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
{ config, pkgs, lib, ... }:
{ config, lib, ... }:

let
  cfg = config.hardware.uinput;
in {
in
{
  options.hardware.uinput = {
    enable = lib.mkEnableOption "uinput support";
  };
@@ -10,7 +11,7 @@ in {
  config = lib.mkIf cfg.enable {
    boot.kernelModules = [ "uinput" ];

    users.groups.uinput = {};
    users.groups.uinput.gid = config.ids.gids.uinput;

    services.udev.extraRules = ''
      SUBSYSTEM=="misc", KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"
+4 −4
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ in

  };


  config = {

    ids.uids = {
@@ -666,6 +665,7 @@ in
      rstudio-server = 324;
      localtimed = 325;
      automatic-timezoned = 326;
      uinput = 327;

      # When adding a gid, make sure it doesn't match an existing
      # uid. Users and groups with the same name should have equal