-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ubuntu-desktop-setup
executable file
·111 lines (94 loc) · 3.45 KB
/
.ubuntu-desktop-setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/bin/bash
set -euo pipefail
# Install latest nvidia driver
sudo apt-get install -y $(apt-cache search nvidia-driver | grep -oP '^nvidia-driver-\d+' | sort | tail -n1)
sudo apt-get install -y \
nvidia-cuda-toolkit build-essential steam firefox apt-transport-https ca-certificates \
curl gnupg lsb-release screen gnome-tweaks gnome-tweak-tool gnome-sushi shellcheck v4l2loopback-dkms
for package in spotify shfmt; do
sudo snap install $package
done
echo STEP: Syncthing
sudo apt-get install -y syncthing
sudo systemctl enable --now syncthing@$USER
echo STEP: Git config
git config --global user.email "justin@dray.be"
git config --global user.name "Justin Dray"
echo STEP: Install Obsidian
if ! which obsidian &>/dev/null; then
(
cd /tmp
curl -Lo obsidian $(curl -s https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest |
grep "browser_download_url.*AppImage" |
cut -d '"' -f 4)
chmod +x obsidian
./obsidian --appimage-extract
sudo mv obsidian /usr/local/bin
sudo rsync -r squashfs-root/usr/share/icons/ /usr/share/icons/
sudo cp squashfs-root/obsidian.desktop /usr/share/application
sed 's|AppRun.*|/usr/local/bin/obsidian|' squashfs-root/obsidian.desktop | sudo tee /usr/share/applications/obsidian.desktop &>/dev/null
)
fi
echo STEP: Change backgrounds
if ! crontab -l | grep -q change-background; then
(
crontab -l 2>/dev/null || :
echo "*/2 * * * * $HOME/.scripts/change-background"
) | crontab -
fi
echo STEP: Docker
if ! which docker &>/dev/null; then
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
fi
echo STEP: Discord
if ! which discord &>/dev/null; then
curl -Lo /tmp/discord.deb https://discord.com/api/download?platform=linux &
format=deb
sudo apt-get install -y /tmp/discord.deb
fi
echo STEP: Netdata
if ! which netdata &>/dev/null; then
bash <(curl -Ss https://my-netdata.io/kickstart.sh) --dont-wait
fi
echo STEP: Miner
if ! which ethminer &>/dev/null; then
(
cd /tmp
cd idle-miner
./install.sh 0xd809cD2e2e2655599C2b1DbCdCa50401579854a0
)
fi
echo STEP: VSCode
if ! which code-insiders &>/dev/null; then
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor >packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo apt update
sudo apt install code-insiders
fi
echo STEP: MangoHUD
if ! which mangohud &>/dev/null; then
(
set +o pipefail
cd /tmp
git clone --recurse-submodules https://github.com/flightlessmango/MangoHud.git
cd MangoHud
pip install mako
yes | ./build.sh build
./build.sh package
./build.sh install
set -o pipefail
)
fi
echo STEP: Updates
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get autoremove -y