Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
[fetch]
prune = true

[commit]
gpgsign = true
# [commit]
# gpgsign = true
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Revert when gpp commit signing will work again.


[push]
default = simple
Expand Down
4 changes: 3 additions & 1 deletion .profile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ fi
eval "$(hub alias -s)"

# Default numlock activation.
numlockx on
if [[ -x "$(command -v numlockx)" ]]; then
numlockx on
fi

if [[ -f ~/.screenlayout/default.sh ]]; then
sh ~/.screenlayout/default.sh
Expand Down
101 changes: 101 additions & 0 deletions os/linux-desktop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#!/usr/bin/env sh
set -e
. /etc/os-release

sudo apt update
sudo apt dist-upgrade --yes
sudo apt install --yes \
fonts-firacode \
fonts-font-awesome \
fonts-hack \
fonts-noto \
fonts-noto-cjk \
fonts-noto-extra \
dconf-editor \
gnome-tweaks \
numlockx \
papirus-icon-theme \
polybar \
rofi \
xfce4-screenshooter \
xfce4-terminal

# Alacritty
sudo add-apt-repository ppa:aslatter/ppa -y
sudo apt update
sudo apt install --yes alacritty

# Google Chrome
sudo sh -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list'
wget -O- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo tee /etc/apt/trusted.gpg.d/linux_signing_key.pub
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 78BD65473CB3BD13
sudo apt update
sudo apt install --yes google-chrome-stable

# Snap only packages.
# And yes, we have to do this shitty commands chaining because
# snap does not understand having an already installed package
# is not that a deal.
snap list | awk '{print $1}' | grep -q "^discord$" || snap install discord
snap list | awk '{print $1}' | grep -q "^code$" || snap install --classic code

# Regolith desktop
# https://regolith-desktop.com/#get-regolith-22
wget -qO - https://regolith-desktop.org/regolith.key | \
gpg --dearmor | sudo tee /usr/share/keyrings/regolith-archive-keyring.gpg > /dev/null
echo deb "[arch=amd64 signed-by=/usr/share/keyrings/regolith-archive-keyring.gpg] \
https://regolith-desktop.org/release-3_1-ubuntu-${VERSION_CODENAME}-amd64 ${VERSION_CODENAME} main" | \
sudo tee /etc/apt/sources.list.d/regolith.list
sudo apt update
sudo apt install --yes \
regolith-desktop \
regolith-session-flashback \
regolith-look-gruvbox \
i3xrocks-keyboard-layout \
i3xrocks-time

# Docker
# @see https://docs.docker.com/engine/install/ubuntu/
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt remove $pkg; done
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu ${VERSION_CODENAME} stable"
sudo mkdir -p /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
sudo apt update
sudo apt install --yes apt-transport-https ca-certificates curl software-properties-common
sudo apt install docker-ce

sudo usermod --append --groups docker "$(whoami)"

# Podman
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Testing/Release.key \
| gpg --dearmor \
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Testing/ /" \
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Unstable/Release.key \
| gpg --dearmor \
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Unstable/ /" \
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null
sudo apt update
sudo apt -y upgrade
sudo apt -y install podman
# Enable rootls podman socket
systemctl --user enable --now podman.socket

sudo systemctl enable docker.service
# NTP service for datetime sync.
sudo systemctl enable systemd-timesyncd.service

# Replace default tderminal
# @see https://stackoverflow.com/a/16808639
sudo update-alternatives --set x-terminal-emulator $(which xfce4-terminal).wrapper

echo "Please reboot."
20 changes: 20 additions & 0 deletions os/windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Set-StrictMode -Version latest
# TODO: Exit on failure (set -e like)
# => https://stackoverflow.com/q/9948517
# If not possible, consider using bash script (call winget.exe) with previous manual WSL installation instead?

# Packages
winget install --disable-interactivity --accept-package-agreements --accept-source-agreements --exact --id Microsoft.PowerToys
winget install --disable-interactivity --accept-package-agreements --accept-source-agreements --exact --id Microsoft.Sysinternals.ProcessMonitor

## Game platforms
winget install --disable-interactivity --accept-package-agreements --accept-source-agreements --exact --id EpicGames.EpicGamesLauncher
winget install --disable-interactivity --accept-package-agreements --accept-source-agreements --exact --id Valve.Steam

## Web browsers
winget install --disable-interactivity --accept-package-agreements --accept-source-agreements --exact --id Google.Chrome
winget install --disable-interactivity --accept-package-agreements --accept-source-agreements --exact --id Mozilla.Firefox
# TODO: Ensure default browser configuration (procmon -> registry set ?)
# -> https://www.tenforums.com/performance-maintenance/124376-settings-using-powershell-cmd-2.html

# TODO: WSL install
97 changes: 1 addition & 96 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,78 +18,27 @@ sudo apt install --yes \
bfs \
btop \
colordiff \
cowsay \
curl \
dconf-editor \
expect \
fonts-firacode \
fonts-font-awesome \
fonts-hack \
fonts-noto \
fonts-noto-cjk \
fonts-noto-extra \
fzf \
git-extras \
gnome-tweaks \
gnupg2 \
gource \
gpg \
htop \
httpie \
hub \
jq \
make \
net-tools \
numlockx \
papirus-icon-theme \
polybar \
ripgrep \
rofi \
screenfetch \
ssh-audit \
subversion \
tmux \
vim \
wget \
xfce4-screenshooter \
xfce4-terminal \
zsh

# Alacritty
sudo add-apt-repository ppa:aslatter/ppa -y
sudo apt update
sudo apt install --yes alacritty

# Google Chrome
sudo sh -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list'
wget -O- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo tee /etc/apt/trusted.gpg.d/linux_signing_key.pub
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 78BD65473CB3BD13
sudo apt update
sudo apt install --yes google-chrome-stable

# Snap only packages.
# And yes, we have to do this shitty commands chaining because
# snap does not understand having an already installed package
# is not that a deal.
snap list | awk '{print $1}' | grep -q "^discord$" || snap install discord
snap list | awk '{print $1}' | grep -q "^slack$" || snap install slack
snap list | awk '{print $1}' | grep -q "^code$" || snap install --classic code

# Regolith desktop
# https://regolith-desktop.com/#get-regolith-22
wget -qO - https://regolith-desktop.org/regolith.key | \
gpg --dearmor | sudo tee /usr/share/keyrings/regolith-archive-keyring.gpg > /dev/null
echo deb "[arch=amd64 signed-by=/usr/share/keyrings/regolith-archive-keyring.gpg] \
https://regolith-desktop.org/release-3_1-ubuntu-${VERSION_CODENAME}-amd64 ${VERSION_CODENAME} main" | \
sudo tee /etc/apt/sources.list.d/regolith.list
sudo apt update
sudo apt install --yes \
regolith-desktop \
regolith-session-flashback \
regolith-look-gruvbox \
i3xrocks-keyboard-layout \
i3xrocks-time

# GHQ
wget -O ghq.zip https://github.com/x-motemen/ghq/releases/download/v1.4.2/ghq_linux_amd64.zip
unzip -o ghq.zip
Expand All @@ -107,48 +56,12 @@ curl -sL "https://github.com/zaquestion/lab/releases/download/v${latest}/lab_${l
sudo install -m755 "${tempFolder}/lab" /usr/bin/lab
rm -rf "${tempFolder}"

# ???
# Keybase
curl --remote-name https://prerelease.keybase.io/keybase_amd64.deb
sudo apt install --yes ./keybase_amd64.deb
rm -f keybase_amd64.deb

# Docker
# @see https://docs.docker.com/engine/install/ubuntu/
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt remove $pkg; done
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu ${VERSION_CODENAME} stable"
sudo mkdir -p /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

sudo apt update
sudo apt install --yes apt-transport-https ca-certificates curl software-properties-common
sudo apt install docker-ce

sudo usermod --append --groups docker "$(whoami)"

# Podman
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Testing/Release.key \
| gpg --dearmor \
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Testing/ /" \
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Unstable/Release.key \
| gpg --dearmor \
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Unstable/ /" \
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null
sudo apt update
sudo apt -y upgrade
sudo apt -y install podman
# Enable rootls podman socket
systemctl --user enable --now podman.socket

git submodule init
git submodule update
git remote set-url origin git@github.com:soullivaneuh/dotfiles.git
Expand Down Expand Up @@ -202,12 +115,4 @@ ln --symbolic --force "${HOME}/p/${GIT_SRC}/contrib/diff-highlight/diff-highligh

sudo chsh -s /bin/zsh $(whoami)

sudo systemctl enable docker.service
# NTP service for datetime sync.
sudo systemctl enable systemd-timesyncd.service

# Replace default tderminal
# @see https://stackoverflow.com/a/16808639
sudo update-alternatives --set x-terminal-emulator $(which xfce4-terminal).wrapper

echo "Please reboot."