Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Switch to new justfile system #342

Merged
merged 7 commits into from
Sep 23, 2023
Merged
Show file tree
Hide file tree
Changes from 6 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: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- '**.txt'
- 'repo_content/**'
- 'spec_files/**'
- 'post_install_files/**'
push:
branches:
- main
Expand All @@ -18,6 +19,7 @@ on:
- '**.txt'
- 'repo_content/**'
- 'spec_files/**'
- 'post_install_files/**'
merge_group:
workflow_dispatch:
env:
Expand Down
10 changes: 10 additions & 0 deletions post_install_files/resilio_sync/fedora-resilio-sync.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Resilio Sync per-user service
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/distrobox-enter -n fedora -- ' /usr/bin/rslsync --nodaemon'

[Install]
WantedBy=default.target
10 changes: 10 additions & 0 deletions system_files/deck/shared/usr/share/ublue-os/firstboot/yafti.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ screens:
default: false
packages:
- Install OpenRazer: just --unstable install-openrazer
Solaar:
description: Application to control Logitech Mice, Keyboards, and Trackpads
default: false
packages:
- Install Solaar: just --unstable install-solaar
Resilio Sync:
description: A file synchronization utility powered by BitTorrent
default: false
packages:
- Install Resilio Sync: just --unstable install-resilio-sync
SteamCMD:
description: Installs SteamCMD
default: true
Expand Down
101 changes: 101 additions & 0 deletions system_files/deck/shared/usr/share/ublue-os/just/30-distrobox.just
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# vim: set ft=make :

# Create an Arch container
distrobox-arch:
echo 'Creating Arch distrobox ...'
distrobox create --nvidia --image quay.io/toolbx-images/archlinux-toolbox:latest -n arch -Y

# Create an Alpine boxkit container
distrobox-boxkit:
echo 'Creating Boxkit distrobox ...'
distrobox create --nvidia --image ghcr.io/ublue-os/boxkit -n boxkit -Y

# Create a Debian container
distrobox-debian:
echo 'Creating Debian distrobox ...'
distrobox create --nvidia --image quay.io/toolbx-images/debian-toolbox:unstable -n debian -Y

# Create a Fedora container
distrobox-fedora:
echo 'Creating Fedora distrobox ...'
distrobox create --nvidia --image ghcr.io/ublue-os/fedora-distrobox:latest -n fedora -Y

# Create an openSUSE container
distrobox-opensuse:
echo 'Creating openSUSE distrobox ...'
distrobox create --nvidia --image quay.io/toolbx-images/opensuse-toolbox:tumbleweed -n opensuse -Y

# Create an Ubuntu container
distrobox-ubuntu:
echo 'Creating Ubuntu distrobox ...'
distrobox create --nvidia --image quay.io/toolbx-images/ubuntu-toolbox:22.04 -n ubuntu -Y

# Install obs-studio-portable from wimpysworld, which bundles an extensive collection of 3rd party plugins
install-obs-studio-portable:
if grep -qz "obs-studio-portable" <<< $(distrobox list); then \
echo 'Removing existing obs-studio-portable install...' && \
distrobox rm obs-studio-portable --force; \
fi && \
echo 'Installing obs-studio-portable...' && \
distrobox create --no-entry --name obs-studio-portable --image ghcr.io/ublue-os/obs-studio-portable --nvidia --yes && \
distrobox-enter -n obs-studio-portable -- 'bash -c "distrobox-export --app obs"' && \
echo 'Install complete'

# Set up Bazzite-Arch container
distrobox-bazzite-arch:
echo 'Creating Bazzite-Arch distrobox ...'
distrobox create --nvidia --image ghcr.io/ublue-os/bazzite-arch -n bazzite-arch -Y

# Install Webapp manager
install-webapp-manager:
if grep -qz "fedora" <<< $(distrobox list); then \
/usr/bin/just --unstable distrobox-fedora \
fi && \
distrobox-enter -n fedora -- sudo sh -c "sudo dnf copr enable -y kylegospo/webapp-manager && \
sudo dnf install -y webapp-manager && \
distrobox-export --app webapp-manager"

# Install Oversteer for Logitech steering wheels
install-oversteer:
if grep -qz "fedora" <<< $(distrobox list); then \
/usr/bin/just --unstable distrobox-fedora \
fi && \
distrobox enter -n fedora -- bash -c 'sudo dnf copr enable -y kylegospo/oversteer && \
sudo dnf install \
python3-evdev \
oversteer && \
distrobox-export --app oversteer'

# Install OpenRazer for Razer gaming hardware
install-openrazer:
if grep -qz "fedora" <<< $(distrobox list); then \
/usr/bin/just --unstable distrobox-fedora \
fi && \
distrobox-enter -n fedora -- bash -c 'sudo wget https://download.opensuse.org/repositories/hardware:/razer/Fedora_$(rpm -E %fedora)/hardware:razer.repo -O /etc/yum.repos.d/hardware:razer.repo && \
sudo dnf install -y \
openrazer-meta'

# Install Solaar for Logitech Mice, Keyboards, and Trackpads
install-solaar:
if grep -qz "fedora" <<< $(distrobox list); then \
/usr/bin/just --unstable distrobox-fedora \
fi && \
distrobox-enter -n fedora -- bash -c 'sudo dnf install -y \
solaar && \
distrobox-export --app solaar' && \
mkdir -p ~/.config/autostart && \
rm -f ~/.config/autostart/fedora-solaar.desktop && \
cp ~/.local/share/applications/fedora-solaar.desktop ~/.config/autostart/fedora-solaar.desktop

# Install Resilio Sync, a file synchronization utility powered by BitTorrent
install-resilio-sync:
if grep -qz "fedora" <<< $(distrobox list); then \
/usr/bin/just --unstable distrobox-fedora \
fi && \
distrobox-enter -n fedora -- bash -c 'sudo rpm --import https://linux-packages.resilio.com/resilio-sync/key.asc && \
printf "[resilio-sync]\nname=Resilio Sync\nbaseurl=https://linux-packages.resilio.com/resilio-sync/rpm/\$basearch\nenabled=1\ngpgcheck=1\n" | sudo tee /etc/yum.repos.d/resilio-sync.repo && \
sudo dnf install -y resilio-sync' && \
mkdir -p ~/.config/systemd/user/ && \
rm -f ~/.config/systemd/user/fedora-resilio-sync.service && \
wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/resilio_sync/fedora-resilio-sync.service -O ~/.config/systemd/user/fedora-resilio-sync.service && \
systemctl enable --user --now fedora-resilio-sync
Original file line number Diff line number Diff line change
@@ -1,43 +1,3 @@
_default:
@just --list --list-heading $'Available commands:\n' --list-prefix $' - ' --justfile /usr/share/ublue-os/just/custom.just

# Update entire system
update-system:
/usr/bin/ublue-update

# Clean up old containers and flatpaks
clean-system:
#!/usr/bin/env bash
podman system prune -a
flatpak uninstall --unused
rpm-ostree cleanup -bm
if [ -x "$(command -v nix-store)" ]; then
nix-store --gc
nix-store --optimise
fi

# Boot into this device's BIOS/UEFI screen
boot-to-bios:
systemctl reboot --firmware-setup

# Enroll Nvidia driver & KMOD signing key for secure boot - Enter password "ublue-os" if prompted
enroll-secure-boot-keys:
sudo mokutil --import /etc/pki/akmods/certs/akmods-ublue.der
echo 'Enter password "ublue-os" if prompted'

# Enable VAAPI in Firefox for Nvidia GPUs
setup-firefox-vaapi-nvidia:
flatpak override \
--user \
--filesystem=host-os \
--env=LIBVA_DRIVER_NAME=nvidia \
--env=LIBVA_DRIVERS_PATH=/run/host/usr/lib64/dri \
--env=LIBVA_MESSAGING_LEVEL=1 \
--env=MOZ_DISABLE_RDD_SANDBOX=1 \
--env=NVD_BACKEND=direct \
--env=MOZ_ENABLE_WAYLAND=1 \
org.mozilla.firefox

# Toggle between desktop/gamescope autologin
toggle-autologin:
#!/usr/bin/env bash
Expand All @@ -48,17 +8,6 @@ toggle-autologin:
sudo touch $DESKTOP_AUTOLOGIN
fi

# Install obs-studio-portable from wimpysworld, which bundles an extensive collection of 3rd party plugins
install-obs-studio-portable:
if grep -qz "obs-studio-portable" <<< $(distrobox list); then \
echo 'Removing existing obs-studio-portable install...' && \
distrobox rm obs-studio-portable --force; \
fi && \
echo 'Installing obs-studio-portable...' && \
distrobox create --no-entry --name obs-studio-portable --image ghcr.io/ublue-os/obs-studio-portable --nvidia --yes && \
distrobox-enter -n obs-studio-portable -- 'bash -c "distrobox-export --app obs"' && \
echo 'Install complete'

# Remove all waydroid-related files in your user folders
reset-waydroid:
bash -c 'sudo rm -rf /var/lib/waydroid /home/.waydroid ~/waydroid ~/.share/waydroid ~/.local/share/applications/*aydroid* ~/.local/share/waydroid'
Expand Down Expand Up @@ -103,18 +52,6 @@ get-steamcmd:
tar -xvzf /tmp/steamcmd.tar.gz -C ~/.steam
rm /tmp/steamcmd.tar.gz

# Install Oversteer for Logitech steering wheels
install-oversteer:
sudo wget https://copr.fedorainfracloud.org/coprs/kylegospo/oversteer/repo/fedora-$(rpm -E %fedora)/kylegospo-oversteer-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_kylegospo-oversteer.repo
ublue-update --wait
rpm-ostree install oversteer

# Install OpenRazer (https://openrazer.github.io)
install-openrazer:
sudo wget https://download.opensuse.org/repositories/hardware:/razer/Fedora_$(rpm -E %fedora)/hardware:razer.repo -O /etc/yum.repos.d/hardware:razer.repo
ublue-update --wait
rpm-ostree install openrazer-meta

# Install Nix with the Determinate Nix Installer
install-nix:
#!/usr/bin/env bash
Expand Down Expand Up @@ -450,34 +387,6 @@ _toggle_wayland:
sudo sed -i 's/false/true/g' /etc/default/desktop-wayland
fi

# Use stock gamepad drivers
use-stock-gamepads:
#!/usr/bin/env bash
sudo bash -c '> /etc/modprobe.d/xone.conf'
sudo bash -c '> /etc/modprobe.d/xpadneo.conf'
sudo bash -c '> /etc/modprobe.d/xpad-noone-blacklist.conf'
sudo bash -c '> /etc/modules-load.d/xpad-noone.conf'

# Use uBlue gamepad drivers (Default)
use-ublue-gamepads:
#!/usr/bin/env bash
sudo rm -f /etc/modprobe.d/xone.conf
sudo rm -f /etc/modprobe.d/xpadneo.conf
sudo rm -f /etc/modprobe.d/xpad-noone-blacklist.conf
sudo rm -f /etc/modules-load.d/xpad-noone.conf

# Disable Broadcom WL driver (Default - WL breaks numerous other Wi-Fi adapters)
disable-broadcom-wl:
#!/usr/bin/env bash
sudo bash -c '> /etc/modules-load.d/broadcom-wl-blacklist.conf'
sudo bash -c 'echo "wl" > /etc/modules-load.d/default-disable-broadcom-wl.conf'

# Use Broadcom WL driver
use-broadcom-wl:
#!/usr/bin/env bash
sudo rm -f /etc/modprobe.d/broadcom-wl-blacklist.conf
sudo rm -f /etc/modprobe.d/default-disable-broadcom-wl.conf

# Enable Flatpak Theming
enable-flatpak-theming:
flatpak override --user --filesystem=xdg-config/gtk-4.0:ro --filesystem=xdg-config/gtk-3.0:ro --filesystem=~/.icons:ro --filesystem=~/.themes:ro
4 changes: 0 additions & 4 deletions system_files/desktop/shared/usr/bin/bazzite-user-setup
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_NAME=$(jq '."image-name"' $IMAGE_INFO)
BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO)

if [[ ! -f "${HOME}/.justfile" ]]; then
echo "!include /usr/share/ublue-os/just/custom.just" >> "${HOME}/.justfile"
fi

if [[ $BASE_IMAGE_NAME =~ "kinoite" ]]; then
echo 'Running setup for Kinoite'

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ screens:
default: false
packages:
- Install OpenRazer: just --unstable install-openrazer
Solaar:
description: Application to control Logitech Mice, Keyboards, and Trackpads
default: false
packages:
- Install Solaar: just --unstable install-solaar
Resilio Sync:
description: A file synchronization utility powered by BitTorrent
default: false
packages:
- Install Resilio Sync: just --unstable install-resilio-sync
amd-additions:
source: yafti.screen.package
values:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# vim: set ft=make :

# Update entire system
update:
/usr/bin/ublue-update
Loading