steam-deck-arch/Makefile
2024-05-10 14:33:01 +03:00

96 lines
3.1 KiB
Makefile

include vars
SHELL=/bin/bash
ROOT_UUID=$(shell blkid -s UUID -o value $(ROOT-DEV))
KERNEL_ARGS="rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 rd.systemd.gpt_auto=no module_blacklist=tpm log_buf_len=4M amd_iommu=off amdgpu.gttsize=8128 spi_amd.speed_dev=1 fbcon=rotate:1 fbcon=vc:4-6"
mount:
mount $(ROOT-DEV) $(MNT-PATH)
mkdir -p $(MNT-PATH)/boot
mount $(BOOT-DEV) $(MNT-PATH)/boot
install-packages: install-base install-jupiter install-gnome install-steam
system: install-packages configure update-pacman-config user move-conn
install-base:
pacstrap -K -C ./pacman.conf $(MNT-PATH) \
core/base \
core/mkinitcpio \
core/nano \
core/sudo \
extra/networkmanager \
extra/zsh \
extra/vim \
extra/noto-fonts \
extra/pipewire \
extra/wireplumber \
extra/pipewire-pulse \
extra/noise-suppression-for-voice \
install-gnome:
pacstrap -K -C ./pacman.conf $(MNT-PATH) \
extra/gnome \
extra/gnome-extra \
install-jupiter:
pacstrap -K -C ./pacman.conf $(MNT-PATH) \
jupiter-3.5/linux-neptune-61 \
jupiter-3.5/linux-firmware-neptune \
jupiter-3.5/jupiter-legacy-support \
jupiter-3.5/jupiter-fan-control \
jupiter-3.5/jupiter-hw-support \
jupiter-3.5/steamdeck-dsp \
jupiter-3.5/alsa-ucm-conf \
jupiter-3.5/alsa-card-profiles \
jupiter-3.5/bluez \
jupiter-3.5/bluez-plugins \
jupiter-3.5/bluez-libs \
jupiter-3.5/bluez-utils \
jupiter-3.5/vpower \
jupiter-3.5/vulkan-radeon \
jupiter-3.5/lib32-vulkan-radeon \
install-steam:
pacstrap -K -C ./pacman.conf $(MNT-PATH) \
jupiter-3.5/steam-jupiter-stable \
configure:
genfstab -U $(MNT-PATH) >> $(MNT-PATH)/etc/fstab
echo steam-deck > $(MNT-PATH)/etc/hostname
arch-chroot $(MNT-PATH) systemctl enable NetworkManager sshd gdm
arch-chroot $(MNT-PATH) ln -sf /usr/share/zoneinfo/$(TIME-ZONE) /etc/localtime
#arch-chroot $(MNT-PATH) hwclock --systohc
arch-chroot $(MNT-PATH) sed -i "s/#ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/g" /etc/locale.gen
arch-chroot $(MNT-PATH) sed -i "s/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g" /etc/locale.gen
arch-chroot $(MNT-PATH) locale-gen
arch-chroot $(MNT-PATH) echo LANG=en_US.UTF-8 > /etc/locale.conf
update-pacman-config:
cat valve-repos >> $(MNT-PATH)/etc/pacman.conf
echo 'Server = https://mirror.yandex.ru/archlinux/$$repo/os/$$arch' > $(MNT-PATH)/etc/pacman.d/mirrorlist
user:
arch-chroot $(MNT-PATH) /bin/bash -c "echo "root:$(ROOT-PASSWORD)" | chpasswd"
arch-chroot $(MNT-PATH) useradd --badname -m -s /bin/zsh $(USER-LOGIN)
arch-chroot $(MNT-PATH) /bin/bash -c "echo "$(USER-LOGIN):$(USER-PASSWORD)" | chpasswd"
arch-chroot $(MNT-PATH) usermod -a -G wheel $(USER-LOGIN)
efiloader:
efibootmgr \
--disk /dev/nvme0n1 \
--part 9 \
--create --label "Arch Linux" \
--loader /vmlinuz-linux-neptune-61 \
--unicode 'root=UUID=$(ROOT_UUID) rw initrd=\initramfs-linux-neptune-61.img $(KERNEL_ARGS)' \
--verbose
move-conn:
cp -r /etc/NetworkManager/system-connections/* $(MNT-PATH)/etc/NetworkManager/system-connections
clear:
mkdir -p /tmp/pacman
rm -rf /tmp/pacman/*
rm -rf $(MNT-PATH)/{bin,dev,etc,home,lib,lib64,mnt,opt,proc,root,run,sbin,srv,sys,tmp,usr,var}
rm -rf $(MNT-PATH)/boot/*