From 860cbf7890a303b35b97e6c5c2c77d8d7bd609d9 Mon Sep 17 00:00:00 2001 From: Evgeny Egorochkin Date: Thu, 6 Dec 2012 02:57:19 +0200 Subject: [PATCH] scanner support: create scanner group. Users need to be in this group to access scanners. --- modules/misc/ids.nix | 1 + modules/services/hardware/sane.nix | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/modules/misc/ids.nix b/modules/misc/ids.nix index 92e9bb908939..218bd0ed47a7 100644 --- a/modules/misc/ids.nix +++ b/modules/misc/ids.nix @@ -131,6 +131,7 @@ in spamd = 56; networkmanager = 57; nslcd = 58; + scanner = 59; # When adding a gid, make sure it doesn't match an existing uid. diff --git a/modules/services/hardware/sane.nix b/modules/services/hardware/sane.nix index 6849b3a7bc8e..905445f22c1b 100644 --- a/modules/services/hardware/sane.nix +++ b/modules/services/hardware/sane.nix @@ -29,6 +29,12 @@ with pkgs.lib; in mkIf config.hardware.sane.enable { environment.systemPackages = [ pkg ]; services.udev.packages = [ pkg ]; + + users.extraGroups = singleton { + name = "scanner"; + gid = config.ids.gids.scanner; + }; + }; }