This repository was archived by the owner on Mar 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathinstall.sh
More file actions
49 lines (39 loc) · 2.06 KB
/
install.sh
File metadata and controls
49 lines (39 loc) · 2.06 KB
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
#!/bin/bash
set -e # Exit on Error
set -x # Log Executions
################################################################################
# Install commands #
################################################################################
cd "$HOME" || return
echo -e "BEEP BOOP. Setting up..."
sudo apt install curl wget gpg -y
sudo apt install openssh-server vim git xclip lsb-release apt-transport-https -y
curl -sS https://starship.rs/install.sh | sh -s -- --force
sudo apt upgrade -y
################################################################################
# Setup SSH #
################################################################################
ssh-keygen -t ed25519 -C "admin@tseknet.com"
eval `ssh-agent -s`
ssh-add
chmod 0700 ~/.ssh # Ensure correct permissions
set +x
echo -e 'Copy to https://github.com/settings/ssh/new'
cat ~/.ssh/id_ed25519.pub | xclip -selection clipboard
echo -e -n "SSH Public Key copied to clipboard: [\033[32m"$(cat ~/.ssh/id_ed25519.pub)"\033[0m]\n"
read -p 'Press any key to continue...'
################################################################################
# Chezmoi #
################################################################################
cd ~
curl -sfL https://git.io/chezmoi | bash
if [ ! -n "$(grep "^github.com " ~/.ssh/known_hosts)" ]; then ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null; fi
export PATH=$HOME/bin:$PATH
chezmoi init --apply --verbose git@github.com:tseknet/dotfiles.git
################################################################################
# Shell #
################################################################################
# Bash is the default shell; install starship prompt (shared config with pwsh)
if ! command -v starship &>/dev/null; then
curl -sS https://starship.rs/install.sh | sh -s -- --yes
fi