]> git.wh0rd.org Git - home.git/blob - .bin/crostini-vapier-setup
dict: add more words
[home.git] / .bin / crostini-vapier-setup
1 #!/bin/bash -ex
2
3 if [[ $# -ne 0 ]]; then
4         echo "Usage: $0"
5         exit 1
6 fi
7
8 if [[ ${UID} -ne 0 ]]; then
9         exec sudo "$0" "$@"
10 fi
11
12 pkgs=(
13         ipython
14         ipython3
15         pylint3
16         python3-bs4
17         python3-dev
18         python3-pip
19         python3-pytest
20         python3-pytest-cov
21         python3-requests
22         python3-virtualenv
23         tox
24
25         advancecomp
26         dict
27         elinks
28         firefox-esr
29         gimp
30         inkscape
31         jpegoptim
32         libreoffice
33         mpv
34         nomacs
35         optipng
36         pngcrush
37         sshfs
38         steam
39         xournal
40
41         autoconf
42         autoconf-archive
43         automake
44         autopoint
45         bc
46         bison
47         ccache
48         clang
49         clang-format
50         cmake
51         dejagnu
52         diffstat
53         dnsutils
54         flex
55         gcc
56         gdb
57         gettext
58         g++
59         git
60         git-email
61         git-svn
62         gnupg
63         keychain
64         libtool
65         mosh
66         nano
67         netcat
68         ninja-build
69         patchutils
70         pax-utils
71         pinfo
72         rsync
73         screen
74         strace
75         subversion
76         texinfo
77         tree
78         unrar
79         unzip
80         vim
81         zeal
82         zip
83
84         openjdk-11-jre-headless
85
86         device-tree-compiler
87         libcap-dev
88         libcap-ng-dev
89         libfdt-dev
90         libftdi-dev
91         libglib2.0-dev
92         liblzma-dev
93         libpixman-1-dev
94         libreadline-dev
95         libsdl1.2-dev
96         libusb-1.0-0-dev
97         pkg-config
98         zlib1g-dev
99 )
100
101 printf "Defaults !tty_tickets\nDefaults timestamp_timeout=360\n" >/etc/sudoers.d/vapier
102 chmod 440 /etc/sudoers.d/vapier
103
104 # Add non-free sources for Steam.
105 sed -i "/^deb .*\/debian .* main$/s:$: contrib non-free:" /etc/apt/sources.list
106 dpkg --add-architecture i386
107
108 curl -s "https://dl-ssl.google.com/linux/linux_signing_key.pub" | apt-key add -
109 echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" >/etc/apt/sources.list.d/google-chrome.list
110
111 curl -s "https://packages.cloud.google.com/apt/doc/apt-key.gpg" | apt-key add -
112 echo "deb [arch=amd64] https://packages.cloud.google.com/apt cloud-sdk main" >/etc/apt/sources.list.d/google-cloud-sdk.list
113
114 curl -s "https://packages.microsoft.com/keys/microsoft.asc" | apt-key add -
115 echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" >/etc/apt/sources.list.d/microsoft-edge.list
116
117 apt-get update
118 apt-get -y dist-upgrade
119
120 apt-get -y install "${pkgs[@]}" \
121         google-chrome-stable google-cloud-sdk microsoft-edge-dev
122
123 ln -sf ~vapier/.profile.d/ROOT-bash_profile ~root/.bash_profile
124 for f in .gitconfig .inputrc .nanorc ; do
125         ln -sf ~vapier/${f} ~root/${f}
126 done
127 rm -f ~root/.profile ~root/.bashrc
128 echo . ~vapier/.profile.d/ROOT-bashrc >~root/.bashrc
129
130 rm -f /etc/motd
131 echo "[crostini]" >/etc/ps1_append
132
133 rm -f /etc/ssh/sshd_not_to_be_run
134 /usr/sbin/sshd