
> Forces every new TCP socket to begin at a > conservative MSS > (min(path MTU, 1024 bytes) – 40). > Immediately sends progressively larger probes > and raises the MSS as soon as they’re ACKed. This has been found to solve very slow deploys with Tailscale, Kamal and our internal Docker registry.
60 lines
2.1 KiB
Bash
60 lines
2.1 KiB
Bash
#!/bin/bash
|
|
|
|
# Copy over Omarchy configs
|
|
cp -R ~/.local/share/omarchy/config/* ~/.config/
|
|
|
|
# Use default bashrc from Omarchy
|
|
cp ~/.local/share/omarchy/default/bashrc ~/.bashrc
|
|
|
|
# Ensure application directory exists for update-desktop-database
|
|
mkdir -p ~/.local/share/applications
|
|
|
|
# If bare install, allow a way for its exclusions to not get added in updates
|
|
if [ -n "$OMARCHY_BARE" ]; then
|
|
mkdir -p ~/.local/state/omarchy
|
|
touch ~/.local/state/omarchy/bare.mode
|
|
fi
|
|
|
|
# Setup GPG configuration with multiple keyservers for better reliability
|
|
sudo mkdir -p /etc/gnupg
|
|
sudo cp ~/.local/share/omarchy/default/gpg/dirmngr.conf /etc/gnupg/
|
|
sudo chmod 644 /etc/gnupg/dirmngr.conf
|
|
sudo gpgconf --kill dirmngr || true
|
|
sudo gpgconf --launch dirmngr || true
|
|
|
|
# Increase lockout limit to 10 and decrease timeout to 2 minutes
|
|
sudo sed -i 's|^\(auth\s\+required\s\+pam_faillock.so\)\s\+preauth.*$|\1 preauth silent deny=10 unlock_time=120|' "/etc/pam.d/system-auth"
|
|
sudo sed -i 's|^\(auth\s\+\[default=die\]\s\+pam_faillock.so\)\s\+authfail.*$|\1 authfail deny=10 unlock_time=120|' "/etc/pam.d/system-auth"
|
|
|
|
# Set Cloudflare as primary DNS (with Google as backup)
|
|
sudo cp ~/.local/share/omarchy/default/systemd/resolved.conf /etc/systemd/
|
|
|
|
# Solve common flakiness with SSH and Tailscale performance
|
|
echo "net.ipv4.tcp_mtu_probing=2" | sudo tee -a /etc/sysctl.d/99-sysctl.conf
|
|
|
|
# Set common git aliases
|
|
git config --global alias.co checkout
|
|
git config --global alias.br branch
|
|
git config --global alias.ci commit
|
|
git config --global alias.st status
|
|
git config --global pull.rebase true
|
|
git config --global init.defaultBranch master
|
|
|
|
# Set identification from install inputs
|
|
if [[ -n "${OMARCHY_USER_NAME//[[:space:]]/}" ]]; then
|
|
git config --global user.name "$OMARCHY_USER_NAME"
|
|
fi
|
|
|
|
if [[ -n "${OMARCHY_USER_EMAIL//[[:space:]]/}" ]]; then
|
|
git config --global user.email "$OMARCHY_USER_EMAIL"
|
|
fi
|
|
|
|
# Set default XCompose that is triggered with CapsLock
|
|
tee ~/.XCompose >/dev/null <<EOF
|
|
include "%H/.local/share/omarchy/default/xcompose"
|
|
|
|
# Identification
|
|
<Multi_key> <space> <n> : "$OMARCHY_USER_NAME"
|
|
<Multi_key> <space> <e> : "$OMARCHY_USER_EMAIL"
|
|
EOF
|