post_install() {
    # Enable services
    systemctl enable pinetab-post-install.service
    
    # Fix GTK in Lomiri
    if [ -e /usr/bin/unity8 ]; then
        install -Dm644 "/opt/pinephone-post-install/lomiri/gtk.css" "/etc/skel/.config/gtk-3.0/gtk.css"
    fi

    # Configure fstab
    echo "Configuring /etc/fstab..."
    echo "LABEL=BOOT_MNJRO  /boot   vfat    defaults,noexec,nodev,showexec     0   0" >> /etc/fstab

    # Configure mkinitcpio.conf
    echo "Configuring /etc/mkinitcpio.conf..."
    sed -i s/"MODULES=()"/"MODULES=(sun4i_drm pwm_sun4i panel_ilitek_ili9881c pwm_bl)"/g /etc/mkinitcpio.conf
    [[ -f "/usr/bin/plymouth" ]] && sed -i s/"^HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)"/"HOOKS=(base udev plymouth autodetect modconf block filesystems keyboard fsck)"/g /etc/mkinitcpio.conf
    [[ -f "/usr/lib/initcpio/install/bootsplash-manjaro" ]] && sed -i s/"^HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)"/"HOOKS=(base udev bootsplash-manjaro autodetect modconf block filesystems keyboard fsck)"/g /etc/mkinitcpio.conf

    # Edit extlinux.conf
    if [ -f /usr/bin/plymouth-set-default-theme ] && [ -d /usr/share/plymouth/themes/materia-manjaro ]; then
        echo "Editing extlinux.conf..."
        sed -i s!"bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash"!"quiet splash loglevel=3 plymouth.ignore-serial-consoles"!g /boot/extlinux/extlinux.conf
        # Set Plymouth Manjaro theme
        plymouth-set-default-theme -R materia-manjaro
    fi
}
