mirror of
https://github.com/philmmanjaro/alma.git
synced 2025-07-25 22:49:28 +02:00
[presets] add ROG ALLY support
This commit is contained in:
parent
42af023b54
commit
391c5d0cc1
12
presets/rog-ally-plasma/00-base.toml
Normal file
12
presets/rog-ally-plasma/00-base.toml
Normal file
@ -0,0 +1,12 @@
|
||||
packages = ["linux64", "linux-firmware", "grub", "efibootmgr", "amd-ucode", "rog-ally-acpi-override", "handygccs-git", "cloud-utils"]
|
||||
script = """
|
||||
set -eux
|
||||
|
||||
install -Dm755 "/shared_dirs/overlay/resize-fs" -t "/usr/bin/"
|
||||
install -Dm755 "/shared_dirs/overlay/rogally-post-install" -t "/usr/bin/"
|
||||
install -Dm644 "/shared_dirs/overlay/rogally-post-install.service" -t "/usr/lib/systemd/system/"
|
||||
|
||||
systemctl enable handycon
|
||||
systemctl enable rogally-post-install
|
||||
"""
|
||||
shared_directories = ["overlay"]
|
1
presets/rog-ally-plasma/01-xorg.toml
Symbolic link
1
presets/rog-ally-plasma/01-xorg.toml
Symbolic link
@ -0,0 +1 @@
|
||||
../xorg.toml
|
1
presets/rog-ally-plasma/02-user.toml
Symbolic link
1
presets/rog-ally-plasma/02-user.toml
Symbolic link
@ -0,0 +1 @@
|
||||
../user.toml
|
1
presets/rog-ally-plasma/03-kde.toml
Symbolic link
1
presets/rog-ally-plasma/03-kde.toml
Symbolic link
@ -0,0 +1 @@
|
||||
../kde.toml
|
1
presets/rog-ally-plasma/04-steam.toml
Symbolic link
1
presets/rog-ally-plasma/04-steam.toml
Symbolic link
@ -0,0 +1 @@
|
||||
../steam.toml
|
13
presets/rog-ally-plasma/05-plymouth.toml
Normal file
13
presets/rog-ally-plasma/05-plymouth.toml
Normal file
@ -0,0 +1,13 @@
|
||||
packages = ["plymouth-kcm", "plymouth-theme-manjaro"]
|
||||
script = """
|
||||
set -eux
|
||||
|
||||
echo "Editing default grub config..."
|
||||
[[ -f "/etc/default/grub" ]] && sed -i s/'GRUB_CMDLINE_LINUX_DEFAULT="'/'GRUB_CMDLINE_LINUX_DEFAULT="splash '/g /etc/default/grub
|
||||
grep GRUB_CMDLINE_LINUX_DEFAULT /etc/default/grub
|
||||
|
||||
echo "Set plymouth theme"
|
||||
sed -i -e "s,.*Theme=.*,Theme=manjaro," /etc/plymouth/plymouthd.conf
|
||||
cat /etc/plymouth/plymouthd.conf
|
||||
plymouth-set-default-theme -R manjaro
|
||||
"""
|
1
presets/rog-ally-plasma/06-audio.toml
Symbolic link
1
presets/rog-ally-plasma/06-audio.toml
Symbolic link
@ -0,0 +1 @@
|
||||
../audio.toml
|
41
presets/rog-ally-plasma/overlay/resize-fs
Normal file
41
presets/rog-ally-plasma/overlay/resize-fs
Normal file
@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get device and partition numbers/names
|
||||
# Root Partition
|
||||
PART_DEV=`findmnt / -o source -n | cut -f1 -d"["`
|
||||
|
||||
# Remove '/dev/' from the name
|
||||
PART_NAME=`echo $PART_DEV | cut -d "/" -f 3`
|
||||
|
||||
# Set just the name of the device, usually mmcblk0
|
||||
DEV_NAME=`echo /sys/block/*/${PART_NAME} | cut -d "/" -f 4`
|
||||
|
||||
# Add /dev/ to device name
|
||||
DEV="/dev/${DEV_NAME}"
|
||||
|
||||
# Get Number of device as single digit integer
|
||||
PART_NUM=`cat /sys/block/${DEV_NAME}/${PART_NAME}/partition`
|
||||
|
||||
# Get size of SDCard (final sector)
|
||||
SECTOR_SIZE=`cat /sys/block/${DEV_NAME}/size`
|
||||
|
||||
# Set the ending sector that the partition should be resized too
|
||||
END_SECTOR=`expr $SECTOR_SIZE - 1`
|
||||
|
||||
#growpartfs $PART_DEV
|
||||
|
||||
# resize the partition
|
||||
# parted command disabled for now. Using sfdisk instead
|
||||
#parted -m $DEV u s resizepart $PART_NUM yes $END_SECTOR
|
||||
echo ", +" | sfdisk --no-reread -N $PART_NUM $DEV
|
||||
|
||||
# reload the partitions in the kernel
|
||||
#partprobe
|
||||
partx -u $DEV
|
||||
|
||||
# resize
|
||||
if [[ $(lsblk -o NAME,FSTYPE | grep $PART_NAME | awk '{print $2}') = "btrfs" ]]; then
|
||||
btrfs filesystem resize max /
|
||||
else
|
||||
resize2fs $PART_DEV
|
||||
fi
|
30
presets/rog-ally-plasma/overlay/rogally-post-install
Executable file
30
presets/rog-ally-plasma/overlay/rogally-post-install
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
# This is the post install script for ROG ALLY devices!
|
||||
|
||||
# Expand the filesystem
|
||||
resize-fs
|
||||
|
||||
# Set chassis
|
||||
hostnamectl set-chassis handset
|
||||
|
||||
# Update appstream DB
|
||||
[[ -e /usr/bin/appstreamcli ]] && /usr/bin/appstreamcli refresh-cache --force
|
||||
|
||||
# Set locales
|
||||
localectl set-locale "en_US.UTF-8"
|
||||
|
||||
# Disable this service, so it only gets run on first boot
|
||||
systemctl disable rogally-post-install.service
|
||||
|
||||
# Start sddm
|
||||
[[ -e /usr/bin/sddm ]] && systemctl enable --now sddm
|
||||
|
||||
# Add ACPI Override (this might need a reboot to work)
|
||||
/usr/bin/update_rogaao
|
||||
|
||||
# Pacman Init
|
||||
pacman-key --init
|
||||
pacman-key --populate archlinuxarm manjaro manjaro-arm
|
||||
|
||||
# Disable the root login
|
||||
passwd --lock root
|
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=ROG ALLY Post Install.
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/rogally-post-install
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
Loading…
x
Reference in New Issue
Block a user