apex: give aiy user permissions to apex

Aiy user does not have permission to r/w to apex devices, so created a
new group apex as well as a udev rule to give r/w permissions to anyone in the group apex.

Change-Id: I942b300c9adcda084b853f24448f7a6c53d9ed0d
diff --git a/debian/aiy-board-tweaks.udev b/debian/aiy-board-tweaks.udev
new file mode 100644
index 0000000..4fbb21d
--- /dev/null
+++ b/debian/aiy-board-tweaks.udev
@@ -0,0 +1,2 @@
+SUBSYSTEM=="apex_power", MODE="0660", GROUP="apex"
+SUBSYSTEM=="apex", MODE="0660", GROUP="apex"
\ No newline at end of file
diff --git a/debian/postinst b/debian/postinst
index 2c2418a..be55ab5 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -22,7 +22,10 @@
 chown aiy:aiy /home/aiy
 echo 'aiy:aiy' |chpasswd
 
-GROUPS="adm audio bluetooth games i2c input plugdev staff sudo users video netdev systemd-journal"
+# Create group apex to give aiy user r/w privileges to apex devices
+groupadd apex
+
+GROUPS="adm audio bluetooth games i2c input plugdev staff sudo users video netdev systemd-journal apex"
 
 for group in $GROUPS; do \
 	adduser aiy $group; \