Something went wrong. Try again.
XR for Universal Blue and Fedora Atomic Desktops
vr fedora-atomic linux
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899#!/usr/bin/env nu# SPDX-License-Identifier: AGPL-3.0-only# Copyright (c) 2026 MatrixFurry <matrix@matrixfurry.com>
use std/log
let axr_containers = try { distrobox ls | parse "{id} | {name} | {status} | {image}" | skip 1 | get name | str trim | where $it == envision or $it == atomic-xr} catch {[]}
def main []: nothing -> nothing { log info "Starting migration"
# TODO: Add explanation of the changes
# Get current state let migrate_envision = ($axr_containers | length) != 0 mut cli_installed = (which axr | length) != 0
# Remove AtomicXR Envision if $migrate_envision and not $cli_installed { log info "Temporarily installing the AtomicXR CLI to remove AtomicXR Envision" try { brew install atomicxr-cli $cli_installed = true } catch { log critical "The AtomicXR CLI is required to remove AtomicXR Envision" return 1 } } if $migrate_envision { log info "Removing AtomicXR Envision" axr envision uninstall } else { log info "AtomicXR Envision is not installed, skipping this step" }
# Remove AtomicXR CLI, and revert it's changes if $cli_installed { log info "Removing AtomicXR CLI" remove-atomicxr-cli } else { log info "AtomicXR CLI is not installed, skipping this step" }
# Migrate to Homebrew-XR tap migrate-tap
# Install Envision if needed if $migrate_envision { brew install envision }
log info "Migration finished"}
def remove-atomicxr-cli []: nothing -> nothing { log info "Removing runtime system packages" axr runtime uninstall
log info "Reverting manual AtomicXR CLI configuration" axr flatpak steam disable-xr axr flatpak gaiasky disable-vr
log info "Uninstalling AtomicXR CLI" brew remove atomicxr-cli}
def migrate-tap []: nothing -> nothing { let axr_taps = brew tap | lines | where $it like "matrixfurry.*/atomic.*"
if ($axr_taps | length) == 0 { log warning "Could not find installed AtomicXR Homebrew Tap, skipping this step" return }
log info "Removing packages installed via the AtomicXR Homebrew Tap" brew list --full-name | lines | where $it like "matrixfurry.*/atomic.*/" | each {|pkg| log info $"-> Uninstalling package: ($pkg | str replace --regex '.*/' '')" brew remove $pkg }
log info "Removing the AtomicXR Homebrew Tap" $axr_taps | each {|tap| brew untap $tap }
log info "Adding Homebrew-XR tap" brew tap matrixfurry.com/xr https://tangled.org/matrixfurry.com/homebrew-xr
# TODO: Re-install packages from new tap}