Skip to content

Commit 9b0da91

Browse files
committed
Improve installation conditions for laptop-specific software
1 parent 5e61a72 commit 9b0da91

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

apt/install_software.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ else
2020
fi
2121
set -u
2222

23+
CHASSIS="$(hostnamectl chassis)"
24+
2325
echo "Configuring apt/dpkg architectures."
2426
ARCH="$(uname -i)"
2527
FOREIGN_ARCHS="$(dpkg --print-foreign-architectures)}"
@@ -95,16 +97,22 @@ if ! grep -q "hypervisor" /proc/cpuinfo; then
9597
)
9698
if [ "${IS_DESKTOP}" = true ]; then
9799
APT_PACKAGES+=("boinc" "cutecom" "gnome-disk-utility" "gparted" "obs-studio" "pipewire-audio" "rpi-imager")
100+
# If running on a laptop
101+
if [ "${CHASSIS}" = "laptop" ]; then
102+
APT_PACKAGES+=("touchegg")
103+
fi
104+
fi
105+
# If running on a laptop
106+
if [ "${CHASSIS}" = "laptop" ]; then
107+
APT_PACKAGES+=("tlp")
98108
fi
99109
fi
100-
# If running on a laptop
101-
if [ "$(hostnamectl chassis)" = "laptop" ]; then
102-
APT_PACKAGES+=("tlp" "touchegg")
103-
fi
110+
104111
# If the system has an Intel CPU
105112
if grep -q "Intel" /proc/cpuinfo; then
106113
APT_PACKAGES+=("intel-media-va-driver" "intel-microcode" "intel-opencl-icd")
107114
fi
115+
108116
# If the system has an Nvidia GPU
109117
if command -v nvidia-smi &> /dev/null; then
110118
APT_PACKAGES+=("boinc-client-nvidia-cuda")

0 commit comments

Comments
 (0)