home · contact · privacy
9675df81987ac29ebfc3198ea6aa122f603121f6
[config] / bookworm / setup_scripts / setup_desktop.sh
1 #!/bin/sh
2 set -e
3 set -x
4 . ./misc.sh
5
6 expect_n_args 1 "(system name)" "$@"
7 get_system_name_arg "$1"
8
9 # Set up system without user environment.
10 cd "${setup_scripts_dir}"
11 ./setup.sh "${system_name}" "" user desktop thinkpad "${system_name}"
12
13 # Set up NVIDIA eGPU config.
14 if [ "$system_name" = "w530" ]; then
15     cd
16     git clone https://github.com/NVIDIA/open-gpu-kernel-modules
17     cd open-gpu-kernel-modules
18     git checkout 337e28e
19     make modules -j$(nproc)
20     make modules_install
21     cd
22     driver_version=535.86.05
23     runscript=NVIDIA-Linux-x86_64-${driver_version}.run
24     wget https://us.download.nvidia.com/XFree86/Linux-x86_64/${driver_version}/${runscript}
25     chmod u+x ${runscript} 
26     ./${runscript} --no-kernel-modules
27 fi
28
29 # Set up user environments.
30 cd "${setup_scripts_dir}"
31 ./copy_dirtree.sh "${config_tree_prefix}/home_files" "/root" minimal root
32 adduser --disabled-password --gecos "" plom
33 usermod -a -G sudo plom
34 passwd plom
35 cp setup_home.sh /home/plom
36 chown plom:plom /home/plom/setup_home.sh