3 # enable all sorts of configuration concerning login, lightdm, networking and grub
5 # enable lightdm greeter
6 if grep -q 'greeter-session' /etc/lightdm/lightdm.conf; then
7 LASTSESSION="$(grep 'greeter-session' /etc/lightdm/lightdm.conf | tail -1)"
8 sed -i "s/$LASTSESSION/greeter-session=lightdm-gtk-greeter/g" /etc/lightdm/lightdm.conf
10 sed -i 's/^\[Seat:\*\]/\[Seat:\*\]\ngreeter-session=lightdm-gtk-greeter/g' /etc/lightdm/lightdm.conf
13 # set up instantwm as a default user session
14 if grep-q '^user-session.*' /etc/lightdm/lightdm.conf; then
15 echo "adjusting user session"
16 sed -i 's/^user-session=.*/user-session=instantwm/g' /etc/lightdm/lightdm.conf
19 # fix gui not showing up
20 sed -i 's/^#logind-check-graphical=.*/logind-check-graphical=true/' /etc/lightdm/lightdm.conf
22 # needed to get internet to work
23 if ! [ -e /opt/topinstall ] && ! iroot partswap; then
24 if ! grep -iq manjaro /etc/os-release; then
26 systemctl enable systemd-swap
27 sed -i 's/^swapfc_enabled=.*/swapfc_enabled=1/' /etc/systemd/swap.conf
31 sed -i 's/# %wheel/%wheel/g' /etc/sudoers
32 systemctl enable lightdm
33 systemctl enable NetworkManager
35 if ! command -v update-grub &>/dev/null; then
36 # can't include this in package
38 grub-mkconfig -o /boot/grub/grub.cfg' >/usr/bin/update-grub
39 chmod 755 /usr/bin/update-grub