6 expect_n_args 1 "(system name)" "$@"
7 get_system_name_arg "$1"
9 # Set up system without user environment.
10 cd "${setup_scripts_dir}"
11 if [ "$system_name" = "w530" || "$system_name" = "x220"]; then
12 ./_setup.sh "${system_name}" "" user desktop thinkpad "${system_name}"
14 ./_setup.sh "${system_name}" "" user desktop "${system_name}"
18 # ppd_deb="hll2350dwpdrv-4.0.0-1.i386.deb"
19 # wget "https://download.brother.com/welcome/dlf103566/${ppd_deb}"
20 # dpkg --add-architecture i386
22 # apt install -y "./${ppd_deb}"
23 # service cups restart
24 # # lpadmin -p 'Brother_HLL2350DW' -m 'brother-HLL2350DW-cups-en.ppd'
26 # # TODO explore potential lpadmin options like -o 'OutputMode=NormalGray'
28 # Set up NVIDIA eGPU config.
29 if [ "$system_name" = "w530" ]; then
31 git clone https://github.com/NVIDIA/open-gpu-kernel-modules
32 cd open-gpu-kernel-modules
34 # git checkout 4c29105335610933e744f4ab2524ea63fc39edaf
35 make modules -j$(nproc)
38 driver_version=535.86.05
39 # driver_version=545.29.06
40 runscript=NVIDIA-Linux-x86_64-${driver_version}.run
41 wget https://us.download.nvidia.com/XFree86/Linux-x86_64/${driver_version}/${runscript}
43 chmod u+x ${runscript}
44 ./${runscript} --no-kernel-modules --silent
46 # TODO I suspect that the GPU falling of the bus may be mildened by running nvidia-persistenced, check https://github.com/NVIDIA/nvidia-persistenced/tree/main/init
49 # Set up user environments.
50 cd "${setup_scripts_dir}"
51 ./copy_dirtree.sh "${config_tree_prefix}/home_files" "/root" minimal root
52 adduser --disabled-password --gecos "" plom
53 usermod -a -G sudo plom
55 cp -a ~/config /home/plom
56 chown -R plom:plom /home/plom/config