#!/bin/bash echo "++++++++++Bem Vindo A Instalação Kodish OS 10 Gamming ++++++++++" # Instala o reflector (nao vem no ISO) pacman -Syu --noconfirm reflector wget set -e # Layout do teclado loadkeys br-abnt2 timedatectl set-ntp true # Detecta o maior disco DISCO=$(lsblk -dpo NAME,SIZE,TYPE | grep -w disk | sort -k2 -h | tail -n1 | awk '{print $1}') echo "Disco detectado: $DISCO" read -rp "TODOS OS DADOS EM $DISCO SERÃO APAGADOS! Deseja continuar? (s/N): " CONFIRMA [[ "$CONFIRMA" != "s" && "$CONFIRMA" != "S" ]] && exit 1 # Limpa disco umount -R /mnt || true wipefs -a "$DISCO" # Particiona GPT parted "$DISCO" --script mklabel gpt parted "$DISCO" --script mkpart ESP fat32 1MiB 513MiB parted "$DISCO" --script set 1 esp on parted "$DISCO" --script mkpart primary ext4 513MiB 100% # Define particoes if [[ "$DISCO" == *"nvme"* ]]; then EFI="${DISCO}p1" ROOT="${DISCO}p2" else EFI="${DISCO}1" ROOT="${DISCO}2" fi # Formata mkfs.fat -F32 "$EFI" mkfs.ext4 "$ROOT" # Monta mount "$ROOT" /mnt mkdir -p /mnt/boot/efi mount "$EFI" /mnt/boot/efi # Pacotes principais pacman -S --noconfirm archlinux-keyring rm -f /var/cache/pacman/pkg/*.zst #pacstrap /mnt base linux linux-firmware vim sudo networkmanager grub efibootmgr os-prober mtools dosfstools pacstrap /mnt base linux-lts linux-lts-headers linux-firmware vim sudo networkmanager grub efibootmgr os-prober mtools dosfstools # fstab genfstab -U /mnt >> /mnt/etc/fstab # 🛠️ Configuração no sistema arch-chroot /mnt /bin/bash < /etc/locale.gen locale-gen echo "LANG=pt_BR.UTF-8" > /etc/locale.conf echo "KEYMAP=br-abnt2" > /etc/vconsole.conf # Hostname echo "archlinux" > /etc/hostname cat < /etc/hosts 127.0.0.1 localhost ::1 localhost 127.0.1.1 archlinux.localdomain archlinux HOSTS # NetworkManager systemctl enable NetworkManager # Suporte a Wi-Fi e Bluetooth pacman -S --noconfirm iwd bluez bluez-utils blueman systemctl enable iwd systemctl enable bluetooth # Usuario padrao useradd -m -G wheel -s /bin/bash kodish echo "kodish:kodish" | chpasswd echo "root:root" | chpasswd echo '%wheel ALL=(ALL:ALL) ALL' > /etc/sudoers.d/wheel # Ativa deteccao de outros sistemas echo "GRUB_DISABLE_OS_PROBER=false" >> /etc/default/grub os-prober # GRUB UEFI com fallback grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Arch --removable --recheck grub-mkconfig -o /boot/grub/grub.cfg # Set Mirror para Brasil pacman -S --noconfirm reflector reflector --country Brazil --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist # Interface grafica XFCE + Xorg pacman -S --noconfirm xorg xfce4 xfce4-goodies lightdm lightdm-gtk-greeter xfce4-whiskermenu-plugin pacman -S --noconfirm thunar-archive-plugin thunar-media-tags-plugin xfce4-battery-plugin xfce4-datetime-plugin pacman -S --noconfirm xfce4-mount-plugin xfce4-netload-plugin xfce4-notifyd xfce4-pulseaudio-plugin xfce4-wavelan-plugin pacman -S --noconfirm xfce4-weather-plugin xfce4-whiskermenu-plugin xfce4-xkb-plugin file-roller network-manager-applet # Ativa LightDM systemctl enable lightdm systemctl set-default graphical.target # Ativa repositorio multilib sed -i '/\[multilib\]/,/Include/s/^#//' /etc/pacman.conf pacman -Sy # Steam + suporte 32-bit pacman -S --noconfirm steam lib32-mesa lib32-libglvnd lib32-vulkan-icd-loader # Codecs multimidia pacman -S --noconfirm gst-libav gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly ffmpeg pacman -S --noconfirm firefox flatpak gparted # Instalar openssh pacman -S --noconfirm ssh systemctl enable sshd systemctl start sshd # Whisker Menu no painel do XFCE mkdir -p /home/kodish/.config/xfce4/xfconf/xfce-perchannel-xml cat > /home/kodish/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml < XML # Permissoes de usuario chown -R kodish:kodish /home/kodish/.config # Extras pacman -S --noconfirm alsa-utils pacman -S --noconfirm pipewire pipewire-pulse wireplumber zenity jq lutris pacman -S --noconfirm noto-fonts-cjk kodi kodi-addon-inputstream-adaptive pacman -S --noconfirm openbox arandr pacman -S --noconfirm wget pacman -S --noconfirm file-roller unzip unrar p7zip pacman -S --noconfirm nemo pacman -S --noconfirm wine wine-mono wine-gecko lib32-gnutls vulkan-icd-loader lib32-vulkan-icd-loader pacman -S --noconfirm ttf-liberation ttf-dejavu noto-fonts noto-fonts-emoji pacman -S --noconfirm fuse2 pacman -S --noconfirm antimicrox pacman -S --noconfirm ntfs-3g pacman -S --noconfirm python-pyqt6 python-psutil python-pygame pacman -S --noconfirm mpv pacman -S --noconfirm ffmpeg gst-libav gst-plugins-good gst-plugins-bad gst-plugins-ugly x264 x265 lame pacman -S --noconfirm hardinfo plymouth pacman -S --noconfirm feh jq cronie pacman -S --noconfirm vulkan-icd-loader lib32-vulkan-icd-loader vulkan-tools pacman -S --noconfirm gamemode mangohud pacman -S --noconfirm lib32-gamemode lib32-mangohud pacman -S --noconfirm winetricks # Scripts externos wget https://raw.githubusercontent.com/kodishmediacenter/Kodish_OS/refs/heads/master/scripts-kodish-gamer/name.sh sh name.sh mkdir -p /home/kodish/Desktop || mkdir -p "/home/kodish/Área de trabalho" cd /home/kodish/Desktop 2>/dev/null || cd "/home/kodish/Área de trabalho" wget https://raw.githubusercontent.com/kodishmediacenter/Kodish_OS/refs/heads/master/scripts-kodish-gamer/deckloader.desktop chmod +x deckloader.desktop chown kodish:kodish deckloader.desktop wget https://raw.githubusercontent.com/kodishmediacenter/Kodish_OS/refs/heads/master/scripts-kodish-gamer/keyboardbr.sh sh keyboardbr.sh # Aliases echo "alias update='sudo pacman -Syu && flatpak update -y'" >> /home/kodish/.bashrc echo "alias iftk='f() { app_id=\${1##*/}; flatpak install \"\$app_id\" -y; }; f'" >> /home/kodish/.bashrc echo "alias ftk='sudo pacman -S install'" >> /home/kodish/.bashrc echo "alias upgrade='sudo pacman -Syu'" >> /home/kodish/.bashrc echo "alias stremio='flatpak run com.stremio.Stremio'" >> /home/kodish/.bashrc echo "alias retrodeck='flatpak install flathub net.retrodeck.retrodeck'" >> /home/kodish/.bashrc echo "alias fupdate='flatpak update -y && sudo flatpak update -y'" >> /home/kodish/.bashrc echo "alias wallpaper='sudo nemo /usr/share/backgrounds/xfce'" >> /home/kodish/.bashrc echo "alias pos='sh /kodish/scripts/flatpaks.sh'" >> /home/kodish/.bashrc echo "alias inyaa='sh /kodish/scripts/instalar_nyaa.sh'" >> /home/kodish/.bashrc echo "alias info='sh /kodish/scripts/hw.sh'" >> /home/kodish/.bashrc echo "alias spotlight='sh /kodish/scripts/spotlight.sh'" >> /home/kodish/.bashrc chown kodish:kodish /home/kodish/.bashrc # Autologin wget https://raw.githubusercontent.com/kodishmediacenter/Kodish-OS-10/refs/heads/main/scripts-kodish-gamer/lightdm.conf cat lightdm.conf > /etc/lightdm/lightdm.conf groupadd -r autologin gpasswd -a kodish autologin rm -r lightdm.conf rm -r keyboardbr.sh # Crontab sudo systemctl enable --now cronie # criar o ambiente para pós instalação mkdir /kodish chmod 777 /kodish mkdir /kodish/scripts chmod 777 /kodish/scripts cd /kodish/scripts wget https://raw.githubusercontent.com/kodishmediacenter/Kodish-OS-10/refs/heads/main/scripts-kodish-gamer/flatpaks.sh wget https://raw.githubusercontent.com/kodishmediacenter/Kodish-OS-10/refs/heads/main/scripts-kodish-gamer/instalar_nyaa.sh wget https://raw.githubusercontent.com/kodishmediacenter/Kodish-OS-10/refs/heads/main/Kodish%20OS/logo-slider.zip wget https://raw.githubusercontent.com/kodishmediacenter/Kodish-OS-10/refs/heads/main/scripts-kodish-gamer/spotlight.sh wget https://raw.githubusercontent.com/kodishmediacenter/Kodish-OS-10/refs/heads/main/scripts-kodish-gamer/hw.sh unzip logo-slider.zip chmod +x instalar_nyaa.sh ./instalar_nyaa.sh # criar o ambiente para pós instalação mkdir /kodish/icon chmod 777 /kodish/icon cd /kodish/icon wget https://raw.githubusercontent.com/kodishmediacenter/Kodish-OS-10/refs/heads/main/Kodish%20OS/deckloader.png # Correções Permissões chmod 777 /home/kodish/Desktop # Lock Kernel echo "" >> /etc/pacman.conf echo "IgnorePkg = linux linux-headers linux-lts linux-lts-headers" >> /etc/pacman.conf