home · contact · privacy
Add missed semicolon.
[config] / bookworm / setup_scripts / setup_desktop.sh
1 #!/bin/sh
2 set -e
3 . ./misc.sh
4
5 expect_n_args 1 "(system name)" "$@"
6 get_system_name_arg "$1"
7
8 # Set up system without user environment.
9 cd "${setup_scripts_dir}"
10 ./setup.sh "${system_name}" "" user desktop thinkpad "${system_name}"
11
12 # Set up printer.
13 ppd_deb="hll2350dwpdrv-4.0.0-1.i386.deb"
14 wget "https://download.brother.com/welcome/dlf103566/${ppd_deb}"
15 dpkg --add-architecture i386
16 apt update
17 apt install -y "./${ppd_deb}"
18 service cups restart
19 # lpadmin -p 'Brother_HLL2350DW' -m 'brother-HLL2350DW-cups-en.ppd'
20 rm "./${ppd_deb}"
21 # TODO explore potential lpadmin options like -o 'OutputMode=NormalGray'
22
23 # Set up NVIDIA eGPU config.
24 if [ "$system_name" = "w530" ]; then
25     cd
26     git clone https://github.com/NVIDIA/open-gpu-kernel-modules
27     cd open-gpu-kernel-modules
28     git checkout 337e28e
29     make modules -j$(nproc)
30     make modules_install
31     cd
32     driver_version=535.86.05
33     runscript=NVIDIA-Linux-x86_64-${driver_version}.run
34     wget https://us.download.nvidia.com/XFree86/Linux-x86_64/${driver_version}/${runscript}
35     rmmod nouveau
36     chmod u+x ${runscript} 
37     ./${runscript} --no-kernel-modules --silent
38     depmod
39 fi
40
41 # Set up user environments.
42 cd "${setup_scripts_dir}"
43 ./copy_dirtree.sh "${config_tree_prefix}/home_files" "/root" minimal root
44 adduser --disabled-password --gecos "" plom
45 usermod -a -G sudo plom
46 passwd plom
47 cp -a ~/config /home/plom
48 chown -R plom:plom /home/plom/config