Files
fedora-toolbox/build_files/build.sh
Dave Jansen dc87c182ac
All checks were successful
Build container image / Build and push image (push) Successful in 4m53s
Merge branch 'main' of davejansen.dev:davejansen/fedora-toolbox
2025-12-05 12:57:35 +09:00

76 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
set -ouex pipefail
# Copy System Files onto root
rsync -rvK /ctx/sys_files/ /
# Copy cosign.pub key into the right location
mkdir -p /etc/pki/containers
cp /ctx/cosign.pub /etc/pki/containers/davejansen.pub
### Install packages
# Add country query to all repo metalinks
# shellcheck disable=SC2016
sed -i -e '/^metalink\=/s/\$releasever\&arch\=\$basearch$/\$releasever\&arch\=\$basearch\&country\=KR,JP,TW/g' /etc/yum.repos.d/*.repo
# Update all existing packages
dnf5 update -y
# Install my own layered packages
dnf5 install -y \
fish \
tmux \
neovim \
ripgrep \
curl wget \
stow \
pass \
wl-clipboard \
htop \
gnupg2-scdaemon \
pinentry pinentry-tty pinentry-gnome3 \
patch gcc gcc-c++ \
python3 python3-pip \
nodejs \
php composer \
weechat \
neomutt libnotify notmuch abook isync \
khal vdirsyncer \
newsboat
#dotnet-sdk-8.0 \
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install LazyGit
dnf5 copr enable -y dejan/lazygit
dnf5 install -y lazygit
# Install `host-spawn`
wget https://github.com/1player/host-spawn/releases/latest/download/host-spawn-x86_64
chmod +x host-spawn-x86_64
mv host-spawn-x86_64 /usr/local/bin/host-spawn
# Set up a few host-spawn aliases
ln -s /usr/local/bin/host-spawn /usr/local/bin/flatpak
ln -s /usr/local/bin/host-spawn /usr/sbin/podman
# For seeing notifications (ie. from )
ln -s /usr/local/bin/host-spawn /usr/sbin/dbus-send
ln -s /usr/local/bin/host-spawn /usr/local/bin/op
# Cleanup
dnf5 clean all
# Remove tmp files
rm -rf /tmp/* || true
# # Make sure /var/tmp is properly created
# mkdir -p /var/tmp
# chmod -R 1777 /var/tmp
echo "Done."