Skip to content

Commit cfc3a3f

Browse files
committed
Initial commit
0 parents  commit cfc3a3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2696
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# editor files
2+
*.swp
3+
*.vim

README.md

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
# Setup Debian
2+
A script to automate the setup of a new Debian based operating system, tuned to my personal liking. Included are setup scripts for both Debian based desktops and servers.
3+
4+
## Table of Contents
5+
6+
- [Requirements](#requirements)
7+
- [Usage](#usage)
8+
- [Import Signing Key](#import-signing-key)
9+
- [Desktop Setup](#desktop-setup)
10+
- [Server Setup](#server-setup)
11+
- [Setup Features](#setup-features)
12+
- [Desktop Setup Features](#desktop-setup-features)
13+
- [Server Setup Features](#server-setup-features)
14+
15+
## Requirements
16+
17+
- Debian or Debian based operating system
18+
- Gnome or Plasma is required for desktop usage
19+
- Access to terminal/shell where output is visible
20+
- Terminal/shell user has sudo privileges
21+
- `bash` & `curl` must be installed already
22+
- `gpg` recommended for signature verification
23+
- Working internet connection
24+
25+
## Usage
26+
27+
### Import Signing Key
28+
29+
Add [xmready's PGP signing key](https://keys.openpgp.org/vks/v1/by-fingerprint/31310B484B30ADABE8527D0E17AF13F5D2F5013A) to your keyring
30+
```
31+
gpg --keyserver "hkps://keys.openpgp.org" --recv-keys 17AF13F5D2F5013A
32+
```
33+
34+
### Desktop Setup
35+
36+
1. Change working directory to `/tmp`
37+
```
38+
cd /tmp
39+
```
40+
2. Download `setup-desktop.sh` with the checksums & signature from the [latest release](https://github.com/xmready/setup-debian/releases)
41+
```
42+
curl --output-dir "$PWD" -fLO "https://github.com/xmready/setup-debian/releases/latest/download/{setup-desktop.sh,SHA256SUMS_DESKTOP,SHA256SUMS_DESKTOP.sign}"
43+
```
44+
3. Verify the PGP signature
45+
```
46+
gpg --verify SHA256SUMS_DESKTOP.sign SHA256SUMS_DESKTOP
47+
```
48+
4. Verify the checksum of `setup-desktop.sh` against `SHA256SUMS_DESKTOP`
49+
```
50+
sha256sum --ignore-missing -c SHA256SUMS_DESKTOP
51+
```
52+
5. Run the setup script
53+
```
54+
chmod +x setup-desktop.sh && ./setup-desktop.sh
55+
```
56+
57+
### Server Setup
58+
59+
1. Change working directory to `/tmp`
60+
```
61+
cd /tmp
62+
```
63+
2. Download `setup-server.sh` with the checksums & signature from the [latest release](https://github.com/xmready/setup-debian/releases)
64+
```
65+
curl --output-dir "$PWD" -fLO "https://github.com/xmready/setup-debian/releases/latest/download/{setup-server.sh,SHA256SUMS_SERVER,SHA256SUMS_SERVER.sign}"
66+
```
67+
3. Verify the PGP signature
68+
```
69+
gpg --verify SHA256SUMS_SERVER.sign SHA256SUMS_SERVER
70+
```
71+
4. Verify the checksum of `setup-server.sh` against `SHA256SUMS_SERVER`
72+
```
73+
sha256sum --ignore-missing -c SHA256SUMS_SERVER
74+
```
75+
5. Run the setup script
76+
```
77+
chmod +x setup-server.sh && ./setup-server.sh
78+
```
79+
80+
## Setup Features
81+
82+
### Desktop Setup Features
83+
84+
For Debian desktop systems `setup-desktop.sh` will do the following:
85+
86+
1. Update & upgrade all packages with `apt-get`
87+
2. Install the following packages with `apt-get`
88+
- bash-completion
89+
- build-essential
90+
- checkinstall
91+
- curl
92+
- fastfetch
93+
- ffmpeg
94+
- flatpak
95+
- fprintd
96+
- fzf
97+
- git
98+
- gnupg
99+
- incus
100+
- libpam-fprintd
101+
- lm-sensors
102+
- nmap
103+
- pipx
104+
- python3-pip
105+
- qrencode
106+
- rename
107+
- rsync
108+
- ssh-audit
109+
- ufw
110+
- wget
111+
3. Customize `.bashrc` for the current user
112+
- Increase `HISTSIZE` & `HISTFILESIZE`
113+
- Customize prompt to display time, working dir, & current Git branch if applicable
114+
- Replace prompt symbol with arrow
115+
- Place prompt symbol & user input on newline
116+
- Disable Flow Control
117+
- Append current session's command history to the history file
118+
- Read any new lines from the history file
119+
- Set up fzf key bindings and fuzzy completion
120+
4. Enable fingerprint authentication
121+
5. Install [Tor](https://torproject.org)
122+
- Add Tor repository
123+
- Install `tor` & `deb.torproject.org-keyring`
124+
- Disable `tor.service` from starting automatically
125+
6. Install [Signal](https://signal.org)
126+
- Add Signal repository
127+
- Install `signal-desktop`
128+
7. Install [Node Version Manager](https://github.com/nvm-sh/nvm)
129+
- Install latest `nvm` version to current user
130+
- Update `.bashrc` to use `nvm` automatically in directories with a `.nvmrc` file
131+
- Install latest stable version of Node.js
132+
- Creates the `nvm` alias `default` which points to the latest stable release
133+
8. Install & configure [Vim](https://www.vim.org)
134+
- Install `vim-nox` & [YouCompleteMe](https://github.com/ycm-core/YouCompleteMe) dependencies
135+
- Install `ycmcompile` script in `~/bin/`
136+
- Install custom `.vimrc` for current user
137+
- Install custom `.vimrc` for root user
138+
- Install custom template files in `~/.vim/templates/`
139+
- Install the following Nerd Fonts for current user
140+
- DejaVuSansMono
141+
- FiraCode
142+
- Hack
143+
- JetBrainsMono
144+
9. Install & configure [Rclone](https://rclone.org)
145+
- Install latest `rclone` version
146+
- Create directories for mounting Google Drive VFS
147+
- Create directory `~/.config/rclone/`
148+
- Install systemd unit files for running `rclone` as a service
149+
10. Autoremove and clean packages using `apt-get`
150+
11. Install verified [Flatpak](https://flatpak.org) apps
151+
- Firefox
152+
- GIMP
153+
- GnuCash
154+
- Kdenlive
155+
- KeePassXC
156+
- Kleopatra
157+
- Plex
158+
- qBittorrent
159+
- Rnote
160+
- Thunderbird
161+
- Ungoogled Chromium
162+
12. Install custom commands in `~/bin/`
163+
- `autoupgrade` (requires sudo)
164+
- `temps`
165+
- `dnsleaktest`
166+
13. Harden network security
167+
- Disable tcp timestamps
168+
- Set default firewall policy with `ufw`
169+
- Enable `ufw`
170+
14. Reboot system after 60 seconds
171+
172+
### Server Setup Features
173+
174+
For Debian server systems `setup-server.sh` will do the following:
175+
176+
1. Update & upgrade all packages with `apt-get`
177+
2. Install the following packages with `apt-get`
178+
- curl
179+
- fail2ban
180+
- git
181+
- gnupg
182+
- lm-sensors
183+
- rsync
184+
- screen
185+
- ufw
186+
3. Customize `.bashrc` for the current user
187+
- Increase `HISTSIZE` & `HISTFILESIZE`
188+
- Disable Flow Control
189+
- Append current session's command history to the history file
190+
- Read any new lines from the history file
191+
4. Configure [Vim](https://www.vim.org)
192+
- Install custom `.vimrc` for current user
193+
- Install custom `.vimrc` for root user
194+
5. Autoremove and clean packages using `apt-get`
195+
6. Install custom commands in `/usr/local/bin/`
196+
- `autoupgrade-server` (requires sudo)
197+
- `temps`
198+
- `dnsleaktest`
199+
7. Harden network security
200+
- Disable tcp timestamps
201+
- Set default firewall policy with `ufw`
202+
- Allow incoming connections on port 22 with `ufw`
203+
- Enable `ufw`
204+
- Generate a new & strong ssh host key with `ssh-keygen`
205+
- Install hardened ssh config file
206+
8. Reboot system after 60 seconds

0 commit comments

Comments
 (0)