5 expect_n_args 1 "(system name)" "$@"
6 get_system_name_arg "$1"
8 # Set up system without user environment.
9 cd "${setup_scripts_dir}"
10 if [ "$system_name" = "w530" || "$system_name" = "x220"]; then
11 ./_setup.sh "${system_name}" "" user desktop thinkpad "${system_name}"
13 ./_setup.sh "${system_name}" "" user desktop "${system_name}"
17 # ppd_deb="hll2350dwpdrv-4.0.0-1.i386.deb"
18 # wget "https://download.brother.com/welcome/dlf103566/${ppd_deb}"
19 # dpkg --add-architecture i386
21 # apt install -y "./${ppd_deb}"
22 # service cups restart
23 # # lpadmin -p 'Brother_HLL2350DW' -m 'brother-HLL2350DW-cups-en.ppd'
25 # # TODO explore potential lpadmin options like -o 'OutputMode=NormalGray'
27 # Set up NVIDIA eGPU config.
28 if [ "$system_name" = "w530" ]; then
30 git clone https://github.com/NVIDIA/open-gpu-kernel-modules
31 cd open-gpu-kernel-modules
33 # git checkout 4c29105335610933e744f4ab2524ea63fc39edaf
34 make modules -j$(nproc)
37 driver_version=535.86.05
38 # driver_version=545.29.06
39 runscript=NVIDIA-Linux-x86_64-${driver_version}.run
40 wget https://us.download.nvidia.com/XFree86/Linux-x86_64/${driver_version}/${runscript}
42 chmod u+x ${runscript}
43 ./${runscript} --no-kernel-modules --silent
45 # 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
48 # Set up user environments.
49 cd "${setup_scripts_dir}"
50 ./copy_dirtree.sh "${config_tree_prefix}/home_files" "/root" minimal root
51 adduser --disabled-password --gecos "" plom
52 usermod -a -G sudo plom
54 cp -a ~/config /home/plom
55 chown -R plom:plom /home/plom/config