Delete custom directory

This commit is contained in:
humocs-man
2026-03-11 19:38:37 +01:00
committed by GitHub
parent 2487de65da
commit 4a582a8e8c
9 changed files with 0 additions and 682 deletions
-74
View File
@@ -1,74 +0,0 @@
# Homebrew Integration
This directory contains Brewfile declarations that will be copied into your custom image at `/usr/share/ublue-os/homebrew/`.
## What are Brewfiles?
Brewfiles are Homebrew's way of declaring packages in a declarative format. They allow you to specify which packages, taps, and casks you want installed.
## How It Works
1. **During Build**: Files in this directory are copied to `/usr/share/ublue-os/homebrew/` in the image
2. **After Installation**: Users install packages by running `brew bundle` commands
3. **User Experience**: Declarative package management via Homebrew
## Usage
### Adding Brewfiles to Your Image
1. Create `.Brewfile` files in this directory
2. Add your desired packages using Brewfile syntax
3. Build your image - the Brewfiles will be copied to `/usr/share/ublue-os/homebrew/`
**Example Files in this directory:**
- [`default.Brewfile`](default.Brewfile) - Essential command-line tools
- [`development.Brewfile`](development.Brewfile) - Development tools and languages
- [`fonts.Brewfile`](fonts.Brewfile) - Programming fonts
### Installing Packages from Brewfiles
After booting into your custom image, install packages with:
```bash
brew bundle --file /usr/share/ublue-os/homebrew/default.Brewfile
```
Or use the convenient ujust commands defined in [`custom/ujust/custom-apps.just`](../ujust/custom-apps.just):
```bash
ujust install-default-apps
ujust install-dev-tools
ujust install-fonts
```
## File Format
Brewfiles use Ruby syntax:
```ruby
# Add a tap (third-party repository)
tap "homebrew/cask"
# Install a formula (CLI tool)
brew "bat"
brew "eza"
brew "ripgrep"
# Install a cask (GUI application, macOS only)
cask "visual-studio-code"
```
## Customization
Edit the existing Brewfiles or create new ones:
- **[`default.Brewfile`](default.Brewfile)** - Modify for your essential tools
- **[`development.Brewfile`](development.Brewfile)** - Add your dev stack
- **[`fonts.Brewfile`](fonts.Brewfile)** - Add preferred fonts
- **Create new files** - `gaming.Brewfile`, `media.Brewfile`, etc.
When you add new Brewfiles, create corresponding ujust commands in [`custom/ujust/custom-apps.just`](../ujust/custom-apps.just) for easy installation.
## Resources
- [Homebrew Documentation](https://docs.brew.sh/)
- [Brewfile Documentation](https://github.com/Homebrew/homebrew-bundle)
- [Bluefin Homebrew Guide](https://docs.projectbluefin.io/administration#homebrew)
-22
View File
@@ -1,22 +0,0 @@
# Default Brewfile for bluepilot
# Add your favorite brew packages here
#
# Examples:
# Modern CLI tools
brew "bat" # cat with syntax highlighting
brew "eza" # Modern replacement for ls
brew "fd" # Simple, fast alternative to find
brew "rg" # ripgrep - faster grep
# Development tools
brew "gh" # GitHub CLI
brew "git" # Git version control
# Shell enhancements
brew "starship" # Cross-shell prompt
brew "zoxide" # Smarter cd command
# Utilities
brew "htop" # Interactive process viewer
brew "tmux" # Terminal multiplexer
-26
View File
@@ -1,26 +0,0 @@
# Brewfile for development tools
# Uncomment packages you want to install
# Container and orchestration tools
# brew "kind" # Kubernetes in Docker
# brew "kubectl" # Kubernetes CLI
# brew "k9s" # Kubernetes TUI
# brew "helm" # Kubernetes package manager
# Cloud tools
# brew "awscli" # AWS CLI
# brew "azure-cli" # Azure CLI
# Programming languages and tools
# brew "go" # Go programming language
# brew "node" # Node.js
# brew "python@3.12" # Python
# brew "rust" # Rust programming language
# Build tools
# brew "cmake" # Cross-platform build system
# brew "ninja" # Small build system
# Debugging and profiling
# brew "gdb" # GNU debugger
# brew "valgrind" # Memory debugging tool
-13
View File
@@ -1,13 +0,0 @@
# Brewfile for fonts
# Nerd Fonts with icons and glyphs for terminals and editors
# Popular coding fonts
cask "font-fira-code-nerd-font"
cask "font-jetbrains-mono-nerd-font"
cask "font-meslo-lg-nerd-font"
cask "font-hack-nerd-font"
# Additional font options (uncomment to install)
# cask "font-ubuntu-nerd-font"
# cask "font-source-code-pro"
# cask "font-cascadia-code-nerd-font"
-95
View File
@@ -1,95 +0,0 @@
# Flatpak Preinstall Integration
This directory contains Flatpak preinstall configuration files that will be copied into your custom image at `/etc/flatpak/preinstall.d/`.
## What is Flatpak Preinstall?
Flatpak preinstall is a feature that allows system administrators to define Flatpak applications that should be installed on first boot. These files are read by the Flatpak system integration and automatically install the specified applications.
## How It Works
1. **During Build**: Files in this directory are copied to `/etc/flatpak/preinstall.d/` in the image
2. **On First Boot**: After user setup completes, the system reads these files and installs the specified Flatpaks
3. **User Experience**: Applications appear automatically after first login
## Important: Installation Timing
**Flatpaks are NOT included in the ISO or container image.** They are downloaded and installed after:
- User completes initial system setup
- Network connection is established
- First boot process runs `flatpak preinstall`
This means:
- The ISO remains small and bootable offline
- Users need an internet connection after installation
- First boot may take longer while Flatpaks download and install
- This is NOT an offline ISO with pre-embedded applications
## File Format
Each file uses the INI format with `[Flatpak Preinstall NAME]` sections:
```ini
[Flatpak Preinstall org.mozilla.firefox]
Branch=stable
[Flatpak Preinstall org.gnome.Calculator]
Branch=stable
```
**Keys:**
- `Install` - (boolean) Whether to install (default: true)
- `Branch` - (string) Branch name (default: "master", commonly "stable")
- `IsRuntime` - (boolean) Whether this is a runtime (default: false for apps)
- `CollectionID` - (string) Collection ID of the remote, if any
See: https://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak-preinstall
## Usage
### Adding Flatpaks to Your Image
1. Edit [`default.preinstall`](default.preinstall) or create new `.preinstall` files in this directory
2. Add Flatpak references in INI format with `[Flatpak Preinstall NAME]` sections
3. Build your image - the files will be copied to `/etc/flatpak/preinstall.d/`
4. After user setup completes, Flatpaks will be automatically installed
**Example Files in this directory:**
- [`default.preinstall`](default.preinstall) - Core applications from Bluefin
### Finding Flatpak IDs
To find the ID of a Flatpak:
```bash
flatpak search app-name
```
Or browse Flathub: https://flathub.org/
## Customization
Edit the existing file or create new ones:
- **[`default.preinstall`](default.preinstall)** - Modify the default application list
- **Create new files:**
- `development.preinstall` - Development tools
- `gaming.preinstall` - Gaming applications
- `media.preinstall` - Media editing tools
Each new `.preinstall` file will be automatically copied during the build process. See [`build/10-build.sh`](../../build/10-build.sh) for how files are copied.
## Important Notes
- Files must use the `.preinstall` extension
- Comments can be added with `#`
- Empty lines are ignored
- **Flatpaks are downloaded from Flathub on first boot** - not embedded in the image
- **Internet connection required** after installation for Flatpaks to install
- Installation happens automatically after user setup completes
- Users can still uninstall these applications if desired
- First boot will take longer while Flatpaks are being installed
## Resources
- [Flatpak Documentation](https://docs.flatpak.org/)
- [Flatpak Preinstall Reference](https://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak-preinstall)
- [Flathub](https://flathub.org/)
-40
View File
@@ -1,40 +0,0 @@
# Default Flatpak applications
# These will be installed on first boot
# Format: INI file with [Flatpak Preinstall NAME] groups
# See: https://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak-preinstall
# Web Browsers
[Flatpak Preinstall org.mozilla.firefox]
Branch=stable
[Flatpak Preinstall org.mozilla.Thunderbird]
Branch=stable
[Flatpak Preinstall org.gnome.Firmware]
Branch=stable
[Flatpak Preinstall org.gnome.Loupe]
Branch=stable
[Flatpak Preinstall org.gnome.Papers]
Branch=stable
[Flatpak Preinstall org.gnome.SimpleScan]
Branch=stable
# System Utilities
[Flatpak Preinstall com.github.tchx84.Flatseal]
Branch=stable
# Universal Blue Specific
[Flatpak Preinstall com.ranfdev.DistroShelf]
Branch=stable
# GTK Themes (runtimes)
[Flatpak Preinstall org.gtk.Gtk3theme.adw-gtk3]
Branch=3.22
IsRuntime=true
[Flatpak Preinstall org.gtk.Gtk3theme.adw-gtk3-dark]
Branch=3.22
IsRuntime=true
-240
View File
@@ -1,240 +0,0 @@
# ujust - User-facing Just Commands
This directory contains Just recipe files that will be installed into your custom image and made available to end users via the `ujust` command.
## What is ujust?
`ujust` is a command that allows users to run predefined tasks on their system. It's built on top of [just](https://github.com/casey/just), a command runner similar to `make` but designed for commands rather than builds.
## How It Works
1. **During Build**: All `.just` files in this directory are consolidated and copied to `/usr/share/ublue-os/just/60-custom.just` in the image
2. **After Installation**: Users run `ujust` to see available commands
3. **User Experience**: Simple command interface for system tasks
## File Structure
Create `.just` files in this directory with your custom commands:
```
custom/ujust/
├── README.md # This file
├── custom-apps.just # Application installation commands
└── custom-system.just # System configuration commands
```
**Example Files in this directory:**
- [`custom-apps.just`](custom-apps.just) - Application installation commands (Brewfiles, Flatpaks, JetBrains Toolbox)
- [`custom-system.just`](custom-system.just) - System configuration commands (benchmarks, dev groups, maintenance)
## Example Commands
### Basic Command
```just
# Run a system maintenance task
run-maintenance:
echo "Running maintenance..."
sudo systemctl restart some-service
```
### Interactive Command with gum
```just
# Configure system setting
configure-thing:
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
echo "Configure thing?"
OPTION=$(Choose "Enable" "Disable")
if [[ "${OPTION,,}" =~ ^enable ]]; then
echo "Enabling..."
# your enable logic
else
echo "Disabling..."
# your disable logic
fi
```
### Command with Group
```just
# Groups organize commands in ujust help
[group('Apps')]
install-brewfile:
brew bundle --file /usr/share/ublue-os/homebrew/development.Brewfile
```
## Best Practices
### Naming Conventions
- Use lowercase with hyphens: `install-something`
- Use verb prefixes for clarity:
- `install-` - Install something
- `configure-` - Configure something pre-installed
- `setup-` - Install + configure
- `toggle-` - Enable/disable a feature
- `fix-` - Apply a fix or workaround
### Command Structure
```just
# Brief description of what the command does
[group('Category')]
command-name:
#!/usr/bin/bash
# Use bash shebang for multi-line scripts
# Commands go here
```
### Error Handling
```just
install-something:
#!/usr/bin/bash
set -euo pipefail # Exit on error, undefined vars, pipe failures
# Your commands
```
### User Prompts
Use `gum` for interactive prompts (included in Universal Blue images):
```just
interactive-command:
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh # Provides Choose() and other helpers
OPTION=$(Choose "Option 1" "Option 2" "Cancel")
echo "You chose: $OPTION"
```
## Common Use Cases
### 1. Installing Software via Brewfiles
```just
[group('Apps')]
install-dev-tools:
brew bundle --file /usr/share/ublue-os/homebrew/development.Brewfile
```
**See examples in [`custom-apps.just`](custom-apps.just)** for Brewfile shortcuts.
### 2. System Configuration
```just
[group('System')]
configure-firewall:
#!/usr/bin/bash
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload
```
**See examples in [`custom-system.just`](custom-system.just)** for system configuration.
### 3. Development Environment Setup
```just
[group('Development')]
setup-nodejs:
#!/usr/bin/bash
curl -fsSL https://fnm.vercel.app/install | bash
source ~/.bashrc
fnm install --lts
```
### 4. Maintenance Tasks
```just
[group('Maintenance')]
clean-containers:
podman system prune -af
podman volume prune -f
```
**See examples in [`custom-system.just`](custom-system.just)** for maintenance tasks.
## Important: Package Installation
**Do not install packages via dnf5/rpm in ujust commands.** Bootc images are immutable and package installation should happen at build time in [`build/10-build.sh`](../../build/10-build.sh).
For runtime package installation, use:
- **Brewfiles** - Create shortcuts to Brewfiles in [`custom/brew/`](../brew/)
- **Flatpak** - Install Flatpaks for GUI applications
- **Containers** - Use toolbox/distrobox for development environments
Example Brewfile shortcut (from [`custom-apps.just`](custom-apps.just)):
```just
[group('Apps')]
install-fonts:
brew bundle --file /usr/share/ublue-os/homebrew/fonts.Brewfile
```
## Available Helpers
Universal Blue images include helpers in `/usr/lib/ujust/ujust.sh`:
- `Choose()` - Present multiple choice menu
- `Confirm()` - Yes/no prompt
- Color variables: `${bold}`, `${normal}`, etc.
## Testing Your Commands
Test locally before committing:
1. Build your image: `just build` (see [`Justfile`](../../Justfile))
2. If on a bootc system: `sudo bootc switch --target localhost/finpilot:stable`
3. Reboot and test: `ujust your-command`
Or test the just files directly:
```bash
just --justfile custom/ujust/custom-apps.just --list
just --justfile custom/ujust/custom-apps.just install-something
```
## Customization
**Start by editing the example files:**
- **[`custom-apps.just`](custom-apps.just)** - Add your application installation commands
- **[`custom-system.just`](custom-system.just)** - Add your system configuration commands
**Create new files** for different categories:
- `custom-gaming.just` - Gaming-related commands
- `custom-media.just` - Media editing workflows
- `custom-dev.just` - Development environment setups
All `.just` files in this directory are automatically included. See [`build/10-build.sh`](../../build/10-build.sh) for the consolidation logic.
## Groups for Organization
Use groups to categorize commands:
```just
[group('Apps')]
install-app:
echo "Installing app..."
[group('System')]
configure-system:
echo "Configuring system..."
[group('Development')]
setup-dev:
echo "Setting up dev environment..."
```
## Examples from Bluefin
The included files provide starting examples:
- **[`custom-apps.just`](custom-apps.just)** - Application installation commands
- **[`custom-system.just`](custom-system.just)** - System configuration commands
These files show how to:
- Create shortcuts to Brewfiles in [`custom/brew/`](../brew/)
- Install Flatpaks interactively
- Configure system settings
- Run maintenance tasks
## Resources
- [Just Manual](https://just.systems/man/en/)
- [Universal Blue Just Documentation](https://universal-blue.org/guide/just/)
- [Bluefin ujust Commands](https://docs.projectbluefin.io/administration)
- [gum Documentation](https://github.com/charmbracelet/gum)
## Notes
- Commands run with user privileges by default
- Use `sudo` or `pkexec` when root access needed
- Consider providing both install and uninstall options
- Test on a clean system before distributing
- Document any prerequisites or dependencies
-80
View File
@@ -1,80 +0,0 @@
# vim: set ft=make :
####################
### custom-apps.just
####################
## Example application installation commands
## These are simplified examples adapted from Bluefin
# Install default applications via Homebrew
[group('Apps')]
install-default-apps:
#!/usr/bin/env bash
echo "Installing default applications via Homebrew..."
brew bundle --file /usr/share/ublue-os/homebrew/default.Brewfile
# Install development tools via Homebrew
[group('Apps')]
install-dev-tools:
#!/usr/bin/env bash
echo "Installing development tools via Homebrew..."
brew bundle --file /usr/share/ublue-os/homebrew/development.Brewfile
# Install fonts via Homebrew
[group('Apps')]
install-fonts:
#!/usr/bin/env bash
echo "Installing fonts via Homebrew..."
brew bundle --file /usr/share/ublue-os/homebrew/fonts.Brewfile
# Install all Brewfiles at once
[group('Apps')]
install-all-brew:
#!/usr/bin/env bash
echo "Installing all applications from Brewfiles..."
brew bundle --file /usr/share/ublue-os/homebrew/default.Brewfile
brew bundle --file /usr/share/ublue-os/homebrew/development.Brewfile
brew bundle --file /usr/share/ublue-os/homebrew/fonts.Brewfile
# Install JetBrains Toolbox for managing JetBrains IDEs
[group('Apps')]
install-jetbrains-toolbox:
#!/usr/bin/env bash
echo "Installing JetBrains Toolbox..."
pushd "$(mktemp -d)"
echo "Fetching latest version..."
curl -sSfL -o releases.json "https://data.services.jetbrains.com/products/releases?code=TBA&latest=true&type=release"
BUILD_VERSION=$(jq -r '.TBA[0].build' ./releases.json)
DOWNLOAD_LINK=$(jq -r '.TBA[0].downloads.linux.link' ./releases.json)
CHECKSUM_LINK=$(jq -r '.TBA[0].downloads.linux.checksumLink' ./releases.json)
echo "Installing JetBrains Toolbox ${BUILD_VERSION}"
curl -sSfL -O "${DOWNLOAD_LINK}"
curl -sSfL "${CHECKSUM_LINK}" | sha256sum -c
tar zxf jetbrains-toolbox-"${BUILD_VERSION}".tar.gz
mkdir -p $HOME/.local/share/JetBrains/ToolboxApp/
mv jetbrains-toolbox-"${BUILD_VERSION}"/* $HOME/.local/share/JetBrains/ToolboxApp/
popd
echo "Launching JetBrains Toolbox..."
$HOME/.local/share/JetBrains/ToolboxApp/bin/jetbrains-toolbox
# Shortcut for install-jetbrains-toolbox
[group('Apps')]
jetbrains-toolbox:
@ujust install-jetbrains-toolbox
# Install a Flatpak application from Flathub
[group('Apps')]
install-flatpak APP_ID:
#!/usr/bin/bash
echo "Installing {{ APP_ID }} from Flathub..."
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y flathub {{ APP_ID }}
# Example: Install VSCode via Flatpak
[group('Apps')]
install-vscode:
ujust install-flatpak com.visualstudio.code
# Example: Install GIMP via Flatpak
[group('Apps')]
install-gimp:
ujust install-flatpak org.gimp.GIMP
-92
View File
@@ -1,92 +0,0 @@
# vim: set ft=make :
#######################
### custom-system.just
#######################
## Example system configuration commands
## These are simplified examples adapted from Bluefin
# Run a system benchmark (requires stress-ng from Homebrew)
[group('System')]
benchmark:
#!/usr/bin/env bash
source /usr/lib/ujust/ujust.sh
if ! type -P "stress-ng" &>/dev/null ; then
echo "stress-ng is not installed."
if command -v brew &>/dev/null; then
if gum confirm "Install stress-ng via Homebrew?" ; then
brew install stress-ng
brew link stress-ng
else
exit 0
fi
else
echo "Please install stress-ng to run benchmarks."
exit 1
fi
fi
echo 'Running a 1 minute benchmark...'
pushd $(mktemp -d) > /dev/null
stress-ng --matrix 0 -t 1m --times
popd > /dev/null
# Configure docker and libvirt groups for development
[group('System')]
configure-dev-groups:
#!/usr/bin/pkexec bash
CURRENT_USER="{{ `id -un` }}"
echo "Adding $CURRENT_USER to docker and libvirt groups..."
# Ensure groups exist in /etc/group
for group in docker libvirt; do
if ! grep -q "^$group:" /etc/group; then
echo "Adding $group to /etc/group"
grep "^$group:" /usr/lib/group | tee -a /etc/group > /dev/null
fi
usermod -aG $group $CURRENT_USER
done
echo "Groups configured. Log out and back in for changes to take effect."
# Example toggle command with user choice
[group('System')]
toggle-example-feature:
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
echo "This is an example toggle command."
echo "Current status: [check your status here]"
OPTION=$(Choose "Enable" "Disable" "Cancel")
case "$OPTION" in
"Enable")
echo "Enabling feature..."
# Add your enable logic here
;;
"Disable")
echo "Disabling feature..."
# Add your disable logic here
;;
"Cancel")
echo "No changes made."
;;
esac
# Clean up container images and volumes
[group('Maintenance')]
clean-containers:
#!/usr/bin/bash
echo "Cleaning up Podman containers, images, and volumes..."
podman system prune -af
podman volume prune -f
echo "Cleanup complete!"
# Update system and reboot if needed
[group('Maintenance')]
update-and-reboot:
#!/usr/bin/bash
source /usr/lib/ujust/ujust.sh
echo "Updating system..."
sudo bootc upgrade
if gum confirm "Reboot now to apply updates?"; then
systemctl reboot
else
echo "Reboot later to apply updates."
fi