mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
nixos/hardware/i2c: fix uaccess rule
This commit is contained in:
parent
1a14c8d6b1
commit
b4e5de4ba4
@ -1,4 +1,4 @@
|
||||
{ config, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
@ -31,10 +31,14 @@ in
|
||||
i2c = { };
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
# allow group ${cfg.group} and users with a seat use of i2c devices
|
||||
ACTION=="add", KERNEL=="i2c-[0-9]*", TAG+="uaccess", GROUP="${cfg.group}", MODE="660"
|
||||
'';
|
||||
services.udev.packages = lib.singleton (pkgs.writeTextFile
|
||||
{ name = "i2c-udev-rules";
|
||||
text = ''
|
||||
# allow group ${cfg.group} and users with a seat use of i2c devices
|
||||
ACTION=="add", KERNEL=="i2c-[0-9]*", TAG+="uaccess", GROUP="${cfg.group}", MODE="660"
|
||||
'';
|
||||
destination = "/etc/udev/rules.d/70-i2c.rules";
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user