Skip to content
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This handles quite a few things;
2. Install a ton of useful packages (see individual installation scripts for full list)
3. Install gpu drivers (include wayland suspend workarounds for nvidia)
4. Install app-specific desktop launchers and icons with their application installers
5. Install rnnoise and configure pipewire to create a noise filtered mic
5. Install RNNoise and Yubico Authenticator under `~/.local/opt`; configure PipeWire to create a noise-filtered mic
6. Configure the system hostname
7. Configure vscode extensions
8. Install zsh and shell color theme
Expand Down
1 change: 0 additions & 1 deletion src/bin/appimage-apps/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
"${SCRIPT_DIR}"/04-r2modman.sh
"${SCRIPT_DIR}"/10-curseforge.sh
"${SCRIPT_DIR}"/11-archon.sh
"${SCRIPT_DIR}"/12-ascension.sh
"${SCRIPT_DIR}"/13-wowup.sh
"${SCRIPT_DIR}"/14-weakauras.sh
"${SCRIPT_DIR}"/15-epic-games-launcher.sh
Expand Down
10 changes: 8 additions & 2 deletions src/bin/common/01-sanitize.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/usr/bin/env bash

set -euo pipefail

URL="https://raw.githubusercontent.com/fontivan/sanitize/main/src/bin/sanitize"
SANITIZE_PATH="/usr/local/bin/sanitize"
TMP_PATH=$(mktemp)

trap 'rm -f -- "${TMP_PATH}"' EXIT

sudo curl -sS "${URL}" -o "/usr/local/bin/sanitize"
sudo chmod +x "/usr/local/bin/sanitize"
curl -fsSL "${URL}" -o "${TMP_PATH}"
sudo install -m 755 "${TMP_PATH}" "${SANITIZE_PATH}"
4 changes: 0 additions & 4 deletions src/bin/fedora/05-dnf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,12 @@ sudo dnf install -y \
"libgpg-error.i686" \
"libxml2.i686" \
"openldap.i686" \
"qjackctl" \
"rsnapshot" \
"rsync" \
"rust" \
"SDL2.i686" \
"snapd" \
"sqlite2.i686" \
"steam" \
"tlp" \
"util-linux-user" \
"wine" \
"zsh" \
"GConf2"
Expand Down
39 changes: 32 additions & 7 deletions src/bin/linux/02-zsh.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,44 @@
#!/usr/bin/env bash

set -euo pipefail

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

# Rename gnome terminal to "default"
gsettings set org.gnome.Terminal.Legacy.Profile:"/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default | sed "s/'//g")/ visible-name 'Default'"
if command -v gsettings >/dev/null 2>&1 &&
gsettings list-schemas | grep -Fxq "org.gnome.Terminal.ProfilesList"; then
PROFILE_ID=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d "'")
gsettings set \
"org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:${PROFILE_ID}/" \
visible-name "'Default'"
fi

# Install oh my zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
if [[ ! -d "${HOME}/.oh-my-zsh" ]]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi

ZSH_CUSTOM="${ZSH_CUSTOM:-${HOME}/.oh-my-zsh/custom}"
mkdir -p "${ZSH_CUSTOM}/plugins"

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting"
git clone https://github.com/zsh-users/zsh-autosuggestions "${ZSH_CUSTOM}/plugins/zsh-autosuggestions"
for PLUGIN in zsh-syntax-highlighting zsh-autosuggestions; do
PLUGIN_PATH="${ZSH_CUSTOM}/plugins/${PLUGIN}"
if [[ ! -d "${PLUGIN_PATH}" ]]; then
if [[ "${PLUGIN}" == "zsh-syntax-highlighting" ]]; then
git clone "https://github.com/zsh-users/${PLUGIN}.git" "${PLUGIN_PATH}"
else
git clone "https://github.com/zsh-users/${PLUGIN}" "${PLUGIN_PATH}"
fi
fi
done

# Copy shell rc to home folder
cp "${SCRIPT_DIR}/../../etc/bash/.bashrc" "/home/$(whoami)/.bashrc"
cp "${SCRIPT_DIR}/../../etc/zsh/.zshrc" "/home/$(whoami)/.zshrc"
cp "${SCRIPT_DIR}/../../etc/bash/.bashrc" "${HOME}/.bashrc"
cp "${SCRIPT_DIR}/../../etc/zsh/.zshrc" "${HOME}/.zshrc"

# Set default shell to zsh
chsh -s "$(which zsh)"
ZSH_PATH=$(command -v zsh)
CURRENT_SHELL=$(getent passwd "${USER}" | cut -d: -f7)
if [[ "${CURRENT_SHELL}" != "${ZSH_PATH}" ]]; then
chsh -s "${ZSH_PATH}"
fi
54 changes: 27 additions & 27 deletions src/bin/linux/05-rnnoise.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
#!/usr/bin/env bash

set -euo pipefail

VERSION="v1.10"

URL="https://github.com/werman/noise-suppression-for-voice/releases/download/${VERSION}/linux-rnnoise.zip"
TMP_PATH="/tmp/linux-rnnoise"
RNNOISE_PATH="/opt/linux-rnnoise"

# Install rnnoise for noise suppression
(
cd /tmp || exit
if [[ -d "${TMP_PATH}" ]]; then
rm -rf "${TMP_PATH}"
fi
curl -OL "${URL}"
unzip linux-rnnoise.zip
if [[ -d "${RNNOISE_PATH}" ]]; then
sudo rm -rf "${RNNOISE_PATH}"
fi
sudo mkdir -p "${RNNOISE_PATH}"
sudo cp -R linux-rnnoise/* "${RNNOISE_PATH}"
sudo chown root:root "${RNNOISE_PATH}"
sudo chmod -R o+r "${RNNOISE_PATH}"
rm -f linux-rnnoise.zip
rm -rf "${TMP_PATH}"
)

# Create symlink for pipewire 1.6.x
# https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/8fd798208777f502a3bd86b02b07a24397792f3f
if [[ ! -d '/usr/lib64/ladspa' ]]; then
sudo mkdir -p '/usr/lib64/ladspa'
TMP_PATH=$(mktemp -d)
RNNOISE_PATH="${HOME}/.local/opt/linux-rnnoise"
PIPEWIRE_DROPIN_PATH="${HOME}/.config/systemd/user/pipewire.service.d/10-rnnoise.conf"

trap 'rm -rf -- "${TMP_PATH}"' EXIT

curl -fL -o "${TMP_PATH}/linux-rnnoise.zip" "${URL}"
unzip -q "${TMP_PATH}/linux-rnnoise.zip" -d "${TMP_PATH}"

if [[ ! -f "${TMP_PATH}/linux-rnnoise/ladspa/librnnoise_ladspa.so" ]]; then
printf 'RNNoise LADSPA plugin not found in downloaded archive\n' >&2
exit 1
fi

sudo ln -s "${RNNOISE_PATH}/ladspa/librnnoise_ladspa.so" "/usr/lib64/ladspa/librnnoise_ladspa.so"
mkdir -p "$(dirname "${RNNOISE_PATH}")"
rm -rf -- "${RNNOISE_PATH}"
mkdir -p "${RNNOISE_PATH}"
cp -R "${TMP_PATH}/linux-rnnoise/." "${RNNOISE_PATH}/"

mkdir -p "$(dirname "${PIPEWIRE_DROPIN_PATH}")"
cat > "${PIPEWIRE_DROPIN_PATH}" <<'EOF'
[Service]
Environment="LADSPA_PATH=%h/.local/opt/linux-rnnoise/ladspa:/usr/lib64/ladspa:/usr/lib/ladspa:/usr/local/lib/ladspa"
EOF

systemctl --user daemon-reload
systemctl --user restart pipewire.service
30 changes: 16 additions & 14 deletions src/bin/linux/09-yubico-authenticator.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
#!/usr/bin/env bash

set -euo pipefail

YUBICO_AUTHENTICATOR_URL="https://developers.yubico.com/yubioath-flutter/Releases/yubico-authenticator-latest-linux.tar.gz"

YUBICO_AUTHENTICATOR="yubico-authenticator"
TARBALL="${YUBICO_AUTHENTICATOR}.tar.gz"
YUBICO_AUTHENTICATOR_PATH="${HOME}/.local/opt/${YUBICO_AUTHENTICATOR}"
TMP_PATH=$(mktemp -d)

trap 'rm -rf -- "${TMP_PATH}"' EXIT

(
cd /tmp || exit
curl -fL -o "${TMP_PATH}/${YUBICO_AUTHENTICATOR}.tar.gz" "${YUBICO_AUTHENTICATOR_URL}"
mkdir -p "${TMP_PATH}/install"
tar -xzf "${TMP_PATH}/${YUBICO_AUTHENTICATOR}.tar.gz" \
--strip-components 1 -C "${TMP_PATH}/install"

curl -L -o "${TARBALL}" "${YUBICO_AUTHENTICATOR_URL}"
mkdir -p "${YUBICO_AUTHENTICATOR}"
tar -xvf "${TARBALL}" --strip-components 1 -C "${YUBICO_AUTHENTICATOR}"
rm "${TARBALL}"
chmod u+x "${TMP_PATH}/install/desktop_integration.sh"
chmod u+x "${TMP_PATH}/install/authenticator"

sudo chown -R root:root "${YUBICO_AUTHENTICATOR}"
sudo chmod +rx "/tmp/${YUBICO_AUTHENTICATOR}/desktop_integration.sh"
sudo chmod +rx "/tmp/${YUBICO_AUTHENTICATOR}/authenticator"
sudo mkdir -p "/opt/${YUBICO_AUTHENTICATOR}"
sudo cp -R "/tmp/${YUBICO_AUTHENTICATOR}/*" "/opt/${YUBICO_AUTHENTICATOR}/"
mkdir -p "$(dirname "${YUBICO_AUTHENTICATOR_PATH}")"
rm -rf -- "${YUBICO_AUTHENTICATOR_PATH}"
mv "${TMP_PATH}/install" "${YUBICO_AUTHENTICATOR_PATH}"

/opt/${YUBICO_AUTHENTICATOR}/desktop_integration.sh --install
)
"${YUBICO_AUTHENTICATOR_PATH}/desktop_integration.sh" --install
Loading