‘Slavage’ from reddit.
Original post:

What is apx?

Apx (/à·peks/) is Vanilla OS’ package manager. Since Vanilla OS is for the most part an immutable operating system, it can’t write packages to the root partition. It creates and manages containers using distrobox and podman (or docker) for various other package managers such as yay, apt, dnf, zypper, and several others. Any package installed in a container can easily be exposed to the host os.

Why would I want the is?

Apx is intended to avoid package conflicts and have all the possible options for places to get packages from. Say you wanted to build a software that is easier to build on Ubuntu than arch, you could run apx install <insert packages here> to install the dependencies without having to find the arch package names or have any conflicting packages. These packages will also not take up space on the fairly-limited-in-size root partition.

Prerequisites

  1. Have pacman set up.
  2. Disabled read only filesystem
  3. An internet connection.
  4. Desktop mode.

I recommend you read through all this and use the help of the internet to figure out what any of these commands do you aren’t sure about.

How to

  1. In a konsole window, install the necessary packages: sudo pacman -Syu base-devel holo-rel/linux-headers linux-neptune-headers holo-rel/linux-lts-headers git glibc gcc gcc-libs fakeroot linux-api-headers libarchive go podman
  2. Clone the apx repo and enter the directory it downloads: git clone --recursive https://github.com/Vanilla-OS/apx.git && cd apx
  3. Build apx with make build
  4. Then install it: sudo make install

Fixing podman

At this point it will not work as podman doesn’t work out of the box. Run the following commands to fix it.

sudo touch /etc/subuid

sudo usermod --add-subuids 10000-75535 deck

sudo touch /etc/subgid

sudo usermod --add-subgids 10000-75535 deck  

Allowing graphical applications

(skip if you don’t need em)

  1. Run kate /etc/systemd/system/apxgui.service
  2. Paste in the following:
[Unit]
Description=Run xhost + on boot

[Service]  
Type=simple
ExecStart=xhost +  

[Install]  
WantedBy=default.target  
WantedBy=graphical-session.target  

  1. Run sudo systemctl enable apxgui to enable the service.
  2. Run sudo systemctl start apxgui to start the service.
  3. run xhost +.

Using apx

Run apx to see a list of arguments and options.

To install packages run apx install <package name>. By default it uses the apt container, but you can make it use any other container by using an argument. For example, apx install --xbps neofetch will install neofetch from the Void Linux repository.

You can run programs from specific containers the same way. apx run --xbps neofetch will run the version of neofetch you have installed in the xbps container.

Entering a container’s environment is the same: apx enter --yay. You can then use it as if you were using that OS.

If it’s not working, that means I probably missed something. Please let me know. I had to noodle through this and looked at my bash history after, so there is a chance I might have missed a required package or something.