From 469f5058133232b760be8b1729cd398499de6a51 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Sat, 10 Aug 2024 21:32:11 +0200 Subject: [PATCH 1/2] nixos/{uinput,ids}: format --- nixos/modules/hardware/uinput.nix | 5 +++-- nixos/modules/misc/ids.nix | 7 +++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/modules/hardware/uinput.nix b/nixos/modules/hardware/uinput.nix index 55e86bfa6bdb..6a55203b14e6 100644 --- a/nixos/modules/hardware/uinput.nix +++ b/nixos/modules/hardware/uinput.nix @@ -1,8 +1,9 @@ -{ config, pkgs, lib, ... }: +{ config, lib, ... }: let cfg = config.hardware.uinput; -in { +in +{ options.hardware.uinput = { enable = lib.mkEnableOption "uinput support"; }; diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 1bdaf713ab5d..f3af6d8e79b7 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -35,7 +35,6 @@ in }; - config = { ids.uids = { @@ -111,7 +110,7 @@ in postgres = 71; #vboxusers = 72; # unused #vboxsf = 73; # unused - smbguest = 74; # unused + smbguest = 74; # unused varnish = 75; datadog = 76; lighttpd = 77; @@ -290,7 +289,7 @@ in postgrey = 258; # hound = 259; # unused, removed 2023-11-21 leaps = 260; - ipfs = 261; + ipfs = 261; # stanchion = 262; # unused, removed 2020-10-14 # riak-cs = 263; # unused, removed 2020-10-14 infinoted = 264; @@ -436,7 +435,7 @@ in postgres = 71; vboxusers = 72; vboxsf = 73; - smbguest = 74; # unused + smbguest = 74; # unused varnish = 75; datadog = 76; lighttpd = 77; From 70119aa60f9e6b4fc129b34de481f1a79d47750b Mon Sep 17 00:00:00 2001 From: r-vdp Date: Sat, 10 Aug 2024 21:32:37 +0200 Subject: [PATCH 2/2] nixis/uinput: use a fixed GID for the uinput group --- nixos/modules/hardware/uinput.nix | 2 +- nixos/modules/misc/ids.nix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/hardware/uinput.nix b/nixos/modules/hardware/uinput.nix index 6a55203b14e6..1845d9cfe565 100644 --- a/nixos/modules/hardware/uinput.nix +++ b/nixos/modules/hardware/uinput.nix @@ -11,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" diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index f3af6d8e79b7..ed016b552edc 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -665,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