steam-deck-arch/Makefile
2024-04-27 12:51:31 +03:00

64 lines
2.2 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"
all: install configure user move-conn
mount:
mount $(ROOT-DEV) $(MNT-PATH)
mkdir -p $(MNT-PATH)/boot
mount $(BOOT-DEV) $(MNT-PATH)/boot
install: install-base install-jupiter
install-base:
pacstrap -K -C ./pacman.conf $(MNT-PATH) core/base extra/networkmanager extra/zsh 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/steam-jupiter-stable \
jupiter-3.5/bluez \
jupiter-3.5/bluez-plugins \
jupiter-3.5/bluez-utils \
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
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"
efiloader:
efibootmgr \
--disk /dev/nvme0n1 \
--part 9 \
--create --label "Arch Linux qq 2" \
--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)/"!(boot)"
rm -rf $(MNT-PATH)/boot/*