+# color scheme for tty
+if ! grep -q '# nord colors' /etc/profile; then
+ echo "applying color scheme"
+
+ echo '# nord colors' >>/etc/profile
+ echo 'if [ "$TERM" = "linux" ]; then' >>/etc/profile
+
+ cat <<EOT >>/etc/profile
+ echo -en "\e]P0383c4a" #black
+ echo -en "\e]P8404552" #darkgrey
+ echo -en "\e]P19A4138" #darkred
+ echo -en "\e]P9E7766B" #red
+ echo -en "\e]P24BEC90" #darkgreen
+ echo -en "\e]PA3CBF75" #green
+ echo -en "\e]P3CFCD63" #brown
+ echo -en "\e]PBFFD75F" #yellow
+ echo -en "\e]P45294e2" #darkblue
+ echo -en "\e]PC579CEF" #blue
+ echo -en "\e]P5CE50DD" #darkmagenta
+ echo -en "\e]PDE7766B" #magenta
+ echo -en "\e]P66BE5E7" #darkcyan
+ echo -en "\e]PE90FDFF" #cyan
+ echo -en "\e]P7CCCCCC" #lightgrey
+ echo -en "\e]PFFFFFFF" #white
+ clear #for background artifacting
+fi
+
+EOT
+
+fi
+
+# /tmp/topinstall is present if rootinstall is running on postinstall
+# like on existing installations
+if ! [ -e /tmp/topinstall ] && command -v plymouth-set-default-theme && ! grep -iq 'manjaro' /etc/os-release; then
+ # install a custom repo
+ if ! grep -q '\[instant\]' /etc/pacman.conf; then
+ /usr/share/instantutils/repo.sh
+ else
+ echo "instantOS repo found"
+ fi
+
+ # deactivate root password, will be reenabled on postinstall
+ if ! grep -iq manjaro /etc/os-release; then
+ echo "root ALL=(ALL) NOPASSWD:ALL #instantosroot" >>/etc/sudoers
+ echo "" >>/etc/sudoers
+ fi
+
+ if ! [ -e /opt/instantos/bootscreen ] && [ -e /opt/instantos/realinstall ] && ! [ -e /opt/instantos/noplymouth ]; then
+ echo "installing boot splash screen"
+ plymouth-set-default-theme instantos
+
+ if ! grep -q 'instantos boot animation' /etc/default/grub; then
+ sed -i '/^GRUB_CMDLINE_LINUX_DEFAULT="/aGRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT quiet splash loglevel=3 rd.udev.log_priority=3 vt.global_cursor_default=0" # instantos boot animation' \
+ /etc/default/grub
+ fi
+
+ if ! grep -q '.*plymouth.* # boot screen' /etc/mkinitcpio.conf; then
+ sed -i '/^HOOKS/aHOOKS+=(plymouth) # boot screen' /etc/mkinitcpio.conf
+ fi
+
+ systemctl disable lightdm
+ systemctl enable lightdm-plymouth
+
+ /etc/mkinitcpio.conf
+ update-grub
+ mkinitcpio -P
+ touch /opt/instantos/bootscreen
+ fi