azure/build.sh

77 lines
2.6 KiB
Bash
Raw Normal View History

2024-05-03 07:56:30 +00:00
#!/bin/bash
set -ouex pipefail
RELEASE="$(rpm -E %fedora)"
2024-05-03 15:11:18 +00:00
### Add repos
2024-05-03 07:56:30 +00:00
2024-05-03 15:11:18 +00:00
# Add Staging repo
2024-11-10 11:43:14 +00:00
curl -Lo /etc/yum.repos.d/ublue-os-staging-fedora-"${RELEASE}".repo https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${RELEASE}"/ublue-os-staging-fedora-"${RELEASE}".repo
2024-05-03 15:11:18 +00:00
# Add Bling repo
2024-11-10 11:43:14 +00:00
curl -Lo /etc/yum.repos.d/ublue-os-bling-fedora-"${RELEASE}".repo https://copr.fedorainfracloud.org/coprs/ublue-os/bling/repo/fedora-"${RELEASE}"/ublue-os-bling-fedora-"${RELEASE}".repo
2024-05-03 15:11:18 +00:00
2024-11-10 11:43:14 +00:00
curl -Lo /etc/yum.repos.d/ganto-lxc4-fedora-"${RELEASE}".repo https://copr.fedorainfracloud.org/coprs/ganto/lxc4/repo/fedora-"${RELEASE}"/ganto-lxc4-fedora-"${RELEASE}".repo
2024-05-03 07:56:30 +00:00
2024-11-10 11:43:14 +00:00
curl -Lo /etc/yum.repos.d/_copr_che-nerd-fonts-"${RELEASE}".repo https://copr.fedorainfracloud.org/coprs/che/nerd-fonts/repo/fedora-"${RELEASE}"/che-nerd-fonts-fedora-"${RELEASE}".repo
2024-05-03 15:11:18 +00:00
2024-11-10 11:43:14 +00:00
curl -Lo /etc/yum.repos.d/_copr_babariviere-tools-"${RELEASE}".repo https://copr.fedorainfracloud.org/coprs/babariviere/tools/repo/fedora-"${RELEASE}"/babariviere-tools-fedora-"${RELEASE}".repo
2024-10-12 19:30:20 +00:00
curl https://downloads.1password.com/linux/keys/1password.asc | tee /etc/pki/rpm-gpg/1password.gpg
### Install 1password using blue-build script
curl -Lo 1password.sh https://raw.githubusercontent.com/blue-build/modules/22fe11d844763bf30bd83028970b975676fe7beb/modules/bling/installers/1password.sh
2024-10-12 19:30:20 +00:00
chmod +x 1password.sh
bash ./1password.sh
rm 1password.sh
2024-05-03 15:11:18 +00:00
### Install packages
2024-05-03 07:56:30 +00:00
2024-05-03 15:11:18 +00:00
grep -v '^#' /tmp/packages | xargs rpm-ostree install
2024-05-03 07:56:30 +00:00
2024-10-12 19:30:20 +00:00
rpm-ostree install 1password
2024-06-03 17:46:13 +00:00
# Install topgrade
pip install --prefix=/usr topgrade
2024-05-05 15:23:33 +00:00
# Installed via flatpak
rpm-ostree override remove firefox firefox-langpacks
2024-11-10 11:39:36 +00:00
#### Quadlets
mkdir -p /etc/containers/systemd/users
2024-11-10 11:39:36 +00:00
curl -Lo /etc/containers/systemd/users/azure-cli.container https://raw.githubusercontent.com/babariviere/toolboxes/main/quadlets/azure-cli/azure-cli.container
sed -i 's/ContainerName=azure/ContainerName=azure-cli/' /etc/containers/systemd/users/azure-cli.container
# Make systemd targets
mkdir -p /usr/lib/systemd/user
QUADLET_TARGETS=(
"azure-cli"
)
for i in "${QUADLET_TARGETS[@]}"; do
2024-11-10 11:39:36 +00:00
cat > "/usr/lib/systemd/user/${i}.target" <<EOF
[Unit]
Description=${i}"target for ${i} quadlet
[Install]
WantedBy=default.target
EOF
done
2024-11-10 11:39:36 +00:00
2024-05-03 15:11:18 +00:00
#### Services
2024-05-03 07:56:30 +00:00
2024-10-12 14:18:40 +00:00
# systemctl enable docker.socket
2024-05-03 07:56:30 +00:00
systemctl enable podman.socket
2024-11-10 11:47:56 +00:00
systemctl enable podman-auto-update.timer
2024-11-10 11:39:36 +00:00
# systemctl enable tailscaled.service
2024-05-05 10:27:56 +00:00
systemctl enable -f --global flatpak-setup.service
2024-06-03 17:46:13 +00:00
systemctl enable -f --global azure-topgrade.service
systemctl enable -f --global azure-cli.target
2024-05-14 09:49:15 +00:00
systemctl enable azure-system-setup.service
systemctl enable azure-groups.service