2020-07-26 23:56:50 +00:00
|
|
|
# Enable ssh.
|
|
|
|
touch ${ROOTFS_DIR}/boot/ssh
|
|
|
|
|
2020-07-27 01:16:53 +00:00
|
|
|
# Boot to graphical by default
|
2020-07-26 23:56:50 +00:00
|
|
|
on_chroot << EOF
|
|
|
|
systemctl set-default graphical.target
|
|
|
|
ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
|
2020-07-27 17:36:31 +00:00
|
|
|
sed /etc/lightdm/lightdm.conf -i -e "s/^\(#\|\)autologin-user=.*/autologin-user=pi/"
|
2020-07-28 00:53:59 +00:00
|
|
|
ln -fs /usr/bin/i3 /etc/alternatives/x-session-manager
|
2020-07-26 23:56:50 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
install -m 644 files/autologin.conf ${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d/autologin.conf
|
|
|
|
|
|
|
|
# Set up sudoers.d for user patch
|
|
|
|
rm -f ${ROOTFS_DIR}/etc/sudoers.d/010_pi-nopasswd
|
|
|
|
install -m 440 files/010_pi-nopasswd ${ROOTFS_DIR}/etc/sudoers.d/
|
2020-07-27 01:16:53 +00:00
|
|
|
|
2020-07-28 00:53:59 +00:00
|
|
|
echo pi - memlock 256000 >> ${ROOTFS_DIR}/etc/security/limits.conf
|
2020-07-28 01:08:56 +00:00
|
|
|
echo pi - rtprio 99 >> ${ROOTFS_DIR}/etc/security/limits.conf
|