Merge branch 'main' into testing

This commit is contained in:
Kyle Gospodnetich 2024-06-23 23:54:05 -07:00
commit 2266759808
4 changed files with 40 additions and 22 deletions

View File

@ -466,6 +466,7 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
rom-properties-kf6 \
joystickwake \
fcitx5-mozc \
fcitx5-chinese-addons \
ptyxis && \
git clone https://github.com/catsout/wallpaper-engine-kde-plugin.git --depth 1 --branch qt6 /tmp/wallpaper-engine-kde-plugin && \
kpackagetool6 --type=Plasma/Wallpaper --global --install /tmp/wallpaper-engine-kde-plugin/plugin && \

View File

@ -378,7 +378,7 @@ O Bazzite é um esforço comunitário e não existiria sem o apoio de todos. Lis
## Faça Sua Própria
O Bazzite é construído inteiramente no GitHub e criar sua própria versão customizada e tão simples quanto fazer um fork deste repositório, adicionar uma chave privada pra assinatura, e habilitar as GitHub actions.
O Bazzite é construído inteiramente no GitHub e criar sua própria versão customizada é tão simples quanto fazer um fork deste repositório, adicionar uma chave privada pra assinatura, e habilitar as GitHub actions.
[Se familiarize](https://docs.github.com/en/actions/security-guides/encrypted-secrets) com o uso de segredos no github. Você vai precisar [gerar um novo par de chaves](https://docs.sigstore.dev/cosign/overview/) com o cosign. A chave pública pode ficar no seu repositório público <sub><sup>(Seus usuários precisam dela pra verificar a assinatura)</sup></sub>, e você pode colar a chave privada em `Settings -> Secrets -> Actions` com o nome `SIGNING_SECRET`.

View File

@ -0,0 +1,12 @@
[Unit]
Description=Enable libvirtd service after reboot
After=local-fs.target
ConditionPathExists=/usr/lib/systemd/system/libvirtd.service
[Service]
Type=oneshot
# TODO: Rewrite this whenever systemd allows to queue ephemeral commands for next boot without modifying kernel args
ExecStart=/usr/bin/bash -c "systemctl enable --now libvirtd; systemctl disable %n"
[Install]
WantedBy=multi-user.target

View File

@ -41,29 +41,34 @@ setup-virtualization ACTION="":
)
fi
if [[ "${OPTION,,}" =~ (^enable[[:space:]]virtualization|virt-on) ]]; then
virt_test=$(rpm-ostree status | grep -A 4 "●" | grep "virt-manager")
if [[ -z ${virt_test} ]]; then
echo "Installing QEMU and virt-manager..."
rpm-ostree install -y virt-manager edk2-ovmf qemu
rpm-ostree kargs \
--append-if-missing="kvm.ignore_msrs=1" \
--append-if-missing="kvm.report_ignored_msrs=0"
echo 'Please re-run "ujust setup-virtualization" after the reboot to enable libvirtd service'
fi
elif [[ "${OPTION,,}" =~ (^disable[[:space:]]virtualization|virt-off) ]]; then
virt_test=$(rpm-ostree status | grep -A 4 "●" | grep "virt-manager")
if [[ ${virt_test} ]]; then
if [ "$(systemctl is-enabled libvirtd.service)" == "enabled" ]; then
echo "${red}Disabling${n} libvirtd before removal"
sudo systemctl disable --now libvirtd 2> /dev/null
(
virt_test=$(rpm-ostree status -v --jsonpath '.deployments[0].packages')
if [[ ${virt_test} == *virt-manager* ]]; then
echo "Installing QEMU and virt-manager..."
rpm-ostree install -y virt-manager edk2-ovmf qemu
rpm-ostree kargs \
--append-if-missing="kvm.ignore_msrs=1" \
--append-if-missing="kvm.report_ignored_msrs=0"
sudo systemctl enable bazzite-libvirtd-setup.service \
&& echo "libvirtd will be enabled at next reboot"
echo 'Please reboot to apply changes'
fi
echo "Removing QEMU and virt-manager..."
rpm-ostree remove -y virt-manager edk2-ovmf qemu
rpm-ostree kargs \
--delete-if-present="kvm.ignore_msrs=1" \
--delete-if-present="kvm.report_ignored_msrs=0"
echo 'Please re-run "ujust enable-virtualization" after the reboot to finish setup'
)
elif [[ "${OPTION,,}" =~ (^disable[[:space:]]virtualization|virt-off) ]]; then
if [ "$(systemctl is-enabled libvirtd.service)" == "enabled" ]; then
echo "${red}Disabling${n} libvirtd before removal"
sudo systemctl disable --now libvirtd 2> /dev/null
fi
if [ "$(systemctl is-enabled bazzite-libvirtd-setup.service)" == "enabled" ]; then
echo "${red}Disabling${n} bazzite-libvirtd-setup"
sudo systemctl disable --now bazzite-libvirtd-setup.service 2> /dev/null
fi
echo "Removing QEMU and virt-manager..."
rpm-ostree remove -y virt-manager edk2-ovmf qemu
rpm-ostree kargs \
--delete-if-present="kvm.ignore_msrs=1" \
--delete-if-present="kvm.report_ignored_msrs=0"
echo 'Please reboot to apply changes'
elif [[ "${OPTION,,}" =~ (^enable[[:space:]]vfio|vfio-on) ]]; then
# Check if we are running on a Steam Deck
if /usr/libexec/hwsupport/valve-hardware; then