# Has anyone got Flox to work with Codex?

**URL:** <https://discourse.flox.dev/t/has-anyone-got-flox-to-work-with-codex/1137>\
**Category:** Help\
**Created:** [June 11, 2025, 6:02am UTC](https://discourse.flox.dev/t/has-anyone-got-flox-to-work-with-codex/1137 "2025-06-11T06:02:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![t0rx](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/t0rx/32/705_2.png) [@t0rx](https://discourse.flox.dev/u/t0rx)\
**Post date:** [June 11, 2025, 6:02am UTC](https://discourse.flox.dev/t/has-anyone-got-flox-to-work-with-codex/1137/1 "2025-06-11T06:02:43Z")

</div>

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:

```bash
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

```auto
+ 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?

---

<div class="post-metadata">

**Author:** ![ysndr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/ysndr/32/340_2.png) [@ysndr](https://discourse.flox.dev/u/ysndr)\
**Post date:** [June 11, 2025, 12:42pm UTC](https://discourse.flox.dev/t/has-anyone-got-flox-to-work-with-codex/1137/2 "2025-06-11T12:42:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![t0rx](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/t0rx/32/705_2.png) [@t0rx](https://discourse.flox.dev/u/t0rx)\
**Post date:** [June 13, 2025, 6:29am UTC](https://discourse.flox.dev/t/has-anyone-got-flox-to-work-with-codex/1137/3 "2025-06-13T06:29:45Z")

</div>

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

```auto
+ 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

```
