Has anyone got Flox to work with Codex?

I’m experimenting with ChatGPT Codex, and would really like to be able to just invoke my Flox environment rather than having to create an environment setup script that I have to maintain separately.

Codex currently only supports their “universal” container (custom images are “coming soon”), so I’m trying to do the Flox installation via the setup scripts:

wget -O /tmp/flox.deb https://flox.dev//downloads/debian-archive/flox.x86_64-linux.deb
dpkg -i /tmp/flox.deb

Unfortunately the dpkg install fails, with this near the end of the log

+ echo 'to place the default nix daemon configuration (part 2)'
to place the default nix daemon configuration (part 2)
+ echo ''

+ return 0
+ is_root
+ '[' 0 -eq 0 ']'
+ return 0
+ env install -m 0664 /tmp/tmp.Se7y5y5Rkn/nix.conf /etc/nix/nix.conf
+ INCLUDE_FLOX='include flox.conf'
+ grep -q 'include flox.conf' /etc/nix/nix.conf
+ echo 'include flox.conf'
+ '[' true = true ']'
+ sed -i 's/build-users-group =.*/build-users-group =/' /etc/nix/nix.conf
+ flox_poly_poly_install_nix
+ tar -C / -xJpf /usr/share/nix/var.tar.xz --no-same-owner
+ flox_extract_nix /usr/share/nix/nix.tar.xz
+ local XZ_PATH=/usr/share/nix/nix.tar.xz
+ tar -C / -xJpf /usr/share/nix/nix.tar.xz --no-same-owner
+ dd if=/dev/null of=/usr/share/nix/nix.tar.xz
+ export PATH=/nix/store/yh6qg1nsi5h2xblcr67030pz58fsaxx3-coreutils-9.6/bin:/nix/store/yd1jggmf5vddlqrg31g1gs03npl6lvmi-daemonize-1.7.8/bin:/nix/store/xq5f95pp297afc2xjgrmhmf9w631qp7m-findutils-4.10.0/bin:/nix/store/xhql0ilzbiqwnmz4z8y0phk611wynxf2-gnused-4.9/bin:/root/.rbenv/shims:/root/.rbenv/bin:/root/.rbenv/shims:/root/.bun/bin:/root/.pyenv/shims:4332PYENV_ROOT/shims:/root/.pyenv/bin:/root/.cargo/bin:/root/.rbenv/shims:/root/.rbenv/bin:/root/.rbenv/shims:/root/.local/share/swiftly/bin:/root/.bun/bin:/root/.nvm/versions/node/v22.16.0/bin:4332PYENV_ROOT/shims:/root/.pyenv/bin:/usr/local/go/bin:/root/go/bin:/root/.rbenv/bin:/root/.rbenv/shims:/root/.bun/bin:/root/.local/bin:/root/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ PATH=/nix/store/yh6qg1nsi5h2xblcr67030pz58fsaxx3-coreutils-9.6/bin:/nix/store/yd1jggmf5vddlqrg31g1gs03npl6lvmi-daemonize-1.7.8/bin:/nix/store/xq5f95pp297afc2xjgrmhmf9w631qp7m-findutils-4.10.0/bin:/nix/store/xhql0ilzbiqwnmz4z8y0phk611wynxf2-gnused-4.9/bin:/root/.rbenv/shims:/root/.rbenv/bin:/root/.rbenv/shims:/root/.bun/bin:/root/.pyenv/shims:4332PYENV_ROOT/shims:/root/.pyenv/bin:/root/.cargo/bin:/root/.rbenv/shims:/root/.rbenv/bin:/root/.rbenv/shims:/root/.local/share/swiftly/bin:/root/.bun/bin:/root/.nvm/versions/node/v22.16.0/bin:4332PYENV_ROOT/shims:/root/.pyenv/bin:/usr/local/go/bin:/root/go/bin:/root/.rbenv/bin:/root/.rbenv/shims:/root/.bun/bin:/root/.local/bin:/root/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ flox_check_selinux
+ test -e /sys/fs/selinux
+ command -v semodule
+ command -v sestatus restorecon
+ command -v systemctl
+ systemctl daemon-reexec
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
+ finish_fail
+ finish_cleanup
+ rm -rf /tmp/tmp.Se7y5y5Rkn
+ failure
+ header 'oh no!'
+ follow=---------------------------------------------------------
++ echo '---- oh no! ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
++ head -c 80
+ header='---- oh no! --------------------------------------------------------------------'
+ echo ''

+ _textout '\033[34m' '---- oh no! --------------------------------------------------------------------'
+ echo -en '\033[34m'
+ shift
+ '[' '---- oh no! --------------------------------------------------------------------' = '' ']'
+ echo '---- oh no! --------------------------------------------------------------------'
---- oh no! --------------------------------------------------------------------
+ echo -en '\033[0m'
+ _textout '\033[31m'
+ echo -en '\033[31m'
+ shift
+ '[' '' = '' ']'
+ cat
Oh no, something went wrong. If you can take all the output and open
an issue, we'd love to fix the problem so nobody else has this issue.

:(

Has anyone got this to work, and if so then how?

Hej

Sorry to hear you ran into issues that soon.
Currently the installer assumes systemd to be the init system, and will call systemctl unconditionally if it exists at all on the system.
I got word that we have work in progress for this to avoid calling systemctl if systemd is not running, which will likely make it into the installers for the next release of flox.

Hi, the 1.4.4 installer still fails due to wanting systemd:

+ systemctl daemon-reexec
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down