Experience report: rough edges installing flox on Debian 12

Yesterday I decided to try Flox. The flox program itself works fine in my initial testing, but I had an unpleasant experience installing it.

I’ve been running nix for a while, and with no issues, on Debian 12 using their nix, nix-bin and nix-setup-systemd packages.

If asked to boil it down the “unpleasantness” into four issues, I would say they were three:

  1. The website is optimized to hand me a .deb (from a download drop down on the landing page), but even the installation instructions aren’t clear about the pros and cons of installing the Flox .deb and replacing an existing nix installation vs simply installing Flox as just another binary within an existing nix installation. It is also not clear that the .deb will install nix for me. I found it unexpected and surprising that it did so.
  2. I find here in the forums a general recommendation to keep using your current nix install, and use the “Nix - Generic” install option, if you’re happy with your current use of nix. This recommendation does not surface clearly on the website’s installation instructions. In my opinion, a question like “is nix already installed on your computer? [yes/no]” is an important one to consider and discuss on the installation page, but I don’t feel this is sufficiently discussed there.
  3. In the specific case of the interplay between Debian 12’s nix packaging and Flox’s .deb, it appears that it is not possible to simply install one set of packages, then the other, and back and forth. This causes problems, and is best avoided (sadly).
  4. The “Nix - Generic” install instructions ask me to ensure my nix is at least version 2.18 but don’t tell me how to check that version. The nix --version output on my system is 2.8.0 and things seem to work fine. This confusion is largely why I went through the trouble of trying to replace my nix install with the flox .deb one.

What follows is a more detailed account of my tail of woe, but the above is a good summary.

Attempt 1: use flox-1.2.2.x86_64-linux.deb

I first attempted to install the deb directly. The .deb download is what
the landing page led me to believe was the best approach.

This did not go well due to a bug in the flox .deb package.

First attempt:

% sudo dpkg -i flox-1.2.2.x86_64-linux.deb
dpkg: regarding flox-1.2.2.x86_64-linux.deb containing flox:
 flox conflicts with nix-setup-systemd
  nix-setup-systemd (version 2.8.0-1.1) is present and installed.

dpkg: error processing archive flox-1.2.2.x86_64-linux.deb (--install):
 conflicting packages - not installing flox
Errors were encountered while processing:
 flox-1.2.2.x86_64-linux.deb

Okay, no problem, apt handles the removal of conflicting packages for me robustly, so
I attempted this:

% sudo apt install ./flox-1.2.2.x86_64-linux.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'flox' instead of './flox-1.2.2.x86_64-linux.deb'
The following packages were automatically installed and are no longer required:
  libboost-context1.74.0 libcpuid16 libdbd-sqlite3-perl libdbi-perl libwww-curl-perl nix-bin
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  nix-setup-systemd
The following NEW packages will be installed:
  flox
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B/82.3 MB of archives.
After this operation, 82.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 /home/matt/Downloads/flox-1.2.2.x86_64-linux.deb flox amd64 1.2.2 [82.3 MB]
(Reading database ... 368690 files and directories currently installed.)
Removing nix-setup-systemd (2.8.0-1.1) ...
(Reading database ... 368682 files and directories currently installed.)
Preparing to unpack .../flox-1.2.2.x86_64-linux.deb ...
Unpacking flox (1.2.2) ...
dpkg: error processing archive /home/matt/Downloads/flox-1.2.2.x86_64-linux.deb (--unpack):
 trying to overwrite '/usr/share/bash-completion/completions/nix', which is also in package nix-bin 2.8.0-1.1+b1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /home/matt/Downloads/flox-1.2.2.x86_64-linux.deb

Bug: the flox package doesn’t conflict with Debian’s nix-bin package. This breaks the install of the flox package.

Workaround: I uninstall nix-bin manually and try again. I do this with apt autoremove to remove the other unecessary packages as well:

% sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  libboost-context1.74.0 libcpuid16 libdbd-sqlite3-perl libdbi-perl libwww-curl-perl nix-bin
0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
After this operation, 18.4 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 368680 files and directories currently installed.)
Removing nix-bin (2.8.0-1.1+b1) ...
Removing libboost-context1.74.0:amd64 (1.74.0+ds1-21) ...
Removing libcpuid16:amd64 (0.6.2+repack1-1) ...
Removing libdbd-sqlite3-perl:amd64 (1.72-1) ...
Removing libdbi-perl:amd64 (1.643-4) ...
Removing libwww-curl-perl:amd64 (4.17-10) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u7) ...

That went well, now let’s try again:

% sudo apt install ./flox-1.2.2.x86_64-linux.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'flox' instead of './flox-1.2.2.x86_64-linux.deb'
The following NEW packages will be installed:
  flox
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/82.3 MB of archives.
After this operation, 82.4 MB of additional disk space will be used.
Get:1 /home/matt/Downloads/flox-1.2.2.x86_64-linux.deb flox amd64 1.2.2 [82.3 MB]
(Reading database ... 368344 files and directories currently installed.)
Preparing to unpack .../flox-1.2.2.x86_64-linux.deb ...
Unpacking flox (1.2.2) ...
Setting up flox (1.2.2) ...
Processing triggers for man-db (2.11.2-2) ...

Did that work?

$ flox --version
1.2.2

Success!

Attempt 2: Keep using Debian 12’s nix packages

I decided that I wanted to keep using Debian’s nix packaging.

% sudo aptitude install nix-setup-systemd
The following NEW packages will be installed:
  libboost-context1.74.0{a} libcpuid16{a} libdbd-sqlite3-perl{a} libdbi-perl{a} libwww-curl-perl{a} nix-bin{a}
  nix-setup-systemd
0 packages upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/4,412 kB of archives. After unpacking 18.4 MB will be used.
The following packages have unmet dependencies:
 flox : Conflicts: nix-setup-systemd but 2.8.0-1.1 is to be installed
The following actions will resolve these dependencies:

     Remove the following packages:
1)     flox [1.2.2 (now)]

Accept this solution? [Y/n/q/?] y

The following NEW packages will be installed:
  libboost-context1.74.0{a} libcpuid16{a} libdbd-sqlite3-perl{a} libdbi-perl{a} libwww-curl-perl{a} nix-bin{a}
  nix-setup-systemd
The following packages will be REMOVED:
  flox{a}
0 packages upgraded, 7 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B/4,412 kB of archives. After unpacking 64.0 MB will be freed.
Do you want to continue? [Y/n/?] y
(Reading database ... 368572 files and directories currently installed.)
Removing flox (1.2.2) ...
Warning: Stopping nix-daemon.service, but it can still be activated by:
  nix-daemon.socket
Synchronizing state of nix-daemon.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable nix-daemon
Removed "/etc/systemd/system/sockets.target.wants/nix-daemon.socket".
Selecting previously unselected package libboost-context1.74.0:amd64.
(Reading database ... 368356 files and directories currently installed.)
Preparing to unpack .../0-libboost-context1.74.0_1.74.0+ds1-21_amd64.deb ...
Unpacking libboost-context1.74.0:amd64 (1.74.0+ds1-21) ...
Selecting previously unselected package libcpuid16:amd64.
Preparing to unpack .../1-libcpuid16_0.6.2+repack1-1_amd64.deb ...
Unpacking libcpuid16:amd64 (0.6.2+repack1-1) ...
Selecting previously unselected package libdbi-perl:amd64.
Preparing to unpack .../2-libdbi-perl_1.643-4_amd64.deb ...
Unpacking libdbi-perl:amd64 (1.643-4) ...
Selecting previously unselected package libdbd-sqlite3-perl:amd64.
Preparing to unpack .../3-libdbd-sqlite3-perl_1.72-1_amd64.deb ...
Unpacking libdbd-sqlite3-perl:amd64 (1.72-1) ...
Selecting previously unselected package libwww-curl-perl:amd64.
Preparing to unpack .../4-libwww-curl-perl_4.17-10_amd64.deb ...
Unpacking libwww-curl-perl:amd64 (4.17-10) ...
Selecting previously unselected package nix-bin.
Preparing to unpack .../5-nix-bin_2.8.0-1.1+b1_amd64.deb ...
Unpacking nix-bin (2.8.0-1.1+b1) ...
Preparing to unpack .../6-nix-setup-systemd_2.8.0-1.1_all.deb ...
Unpacking nix-setup-systemd (2.8.0-1.1) ...
Setting up libwww-curl-perl:amd64 (4.17-10) ...
Setting up libboost-context1.74.0:amd64 (1.74.0+ds1-21) ...
Setting up libcpuid16:amd64 (0.6.2+repack1-1) ...
Setting up libdbi-perl:amd64 (1.643-4) ...
Setting up libdbd-sqlite3-perl:amd64 (1.72-1) ...
Setting up nix-bin (2.8.0-1.1+b1) ...
Setting up nix-setup-systemd (2.8.0-1.1) ...
nix-daemon.service is a disabled or a static unit not running, not starting it.
nix-daemon.socket is a disabled or a static unit not running, not starting it.
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u7) ...

Current status: 952 (-1) new.

Bug: Uninstalling flox and immediately installing the Debian 12 nix packages doesn’t seem to work.

Now, feeling that I’m in a tight spot, I attempt to install flox:

% sudo dpkg --purge nix-setup-systemd nix-bin
(Reading database ... 368702 files and directories currently installed.)
Removing nix-setup-systemd (2.8.0-1.1) ...
Purging configuration files for nix-setup-systemd (2.8.0-1.1) ...
Removing nix-bin (2.8.0-1.1+b1) ...
Processing triggers for man-db (2.11.2-2) ...
% sudo dpkg -i ./flox-1.2.2.x86_64-linux.deb
(Reading database ... 368559 files and directories currently installed.)
Preparing to unpack ./flox-1.2.2.x86_64-linux.deb ...
Unpacking flox (1.2.2) ...
Setting up flox (1.2.2) ...
WARNING: could not find previous nix installation, attempting re-install
Installation failed. See /tmp/flox-installation.log.1722112203 for logs.
dpkg: error processing package flox (--install):
 installed flox package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.11.2-2) ...
Errors were encountered while processing:
 flox

Bug: At this point both the Debian nix packages and the flox .deb are uninstallable.

The contents of the flox-installation.log mentioned above are below, but
the upshot is that it doesn’t like the nixbld users being numbered from
987-999. I believe these users are set up by the Debian nix packages.

+ trap flox_exit_error ERR
+ flox_main
+ cat /usr/share/nix/scripts/install-multi-user.sh
+ awk '/set an empty initial arg for bare invocations/ {exit} {print}'
+ sed -e 's%EXTRACTED_NIX_PATH=.*%EXTRACTED_NIX_PATH="/usr/share/nix/scripts"%'
+ . /usr/share/nix/scripts/flox-install-multi-user.sh
++ set -eu
++ set -o pipefail
++ readonly 'ESC=\033[0m'
++ ESC='\033[0m'
++ readonly 'BOLD=\033[1m'
++ BOLD='\033[1m'
++ readonly 'BLUE=\033[34m'
++ BLUE='\033[34m'
++ readonly 'BLUE_UL=\033[4;34m'
++ BLUE_UL='\033[4;34m'
++ readonly 'GREEN=\033[32m'
++ GREEN='\033[32m'
++ readonly 'GREEN_UL=\033[4;32m'
++ GREEN_UL='\033[4;32m'
++ readonly 'RED=\033[31m'
++ RED='\033[31m'
++ readonly NIX_USER_COUNT=32
++ NIX_USER_COUNT=32
++ readonly NIX_BUILD_GROUP_ID=30000
++ NIX_BUILD_GROUP_ID=30000
++ readonly NIX_BUILD_GROUP_NAME=nixbld
++ NIX_BUILD_GROUP_NAME=nixbld
++ NIX_FIRST_BUILD_UID=30001
++ NIX_BUILD_USER_NAME_TEMPLATE=nixbld%d
++ readonly NIX_ROOT=/nix
++ NIX_ROOT=/nix
++ readonly NIX_EXTRA_CONF=
++ NIX_EXTRA_CONF=
++ PROFILE_TARGETS=('/etc/bashrc' '/etc/profile.d/nix.sh' '/etc/zshrc' '/etc/bash.bashrc' '/etc/zsh/zshrc')
++ readonly PROFILE_TARGETS
++ readonly PROFILE_BACKUP_SUFFIX=.backup-before-nix
++ PROFILE_BACKUP_SUFFIX=.backup-before-nix
++ readonly PROFILE_NIX_FILE=/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
++ PROFILE_NIX_FILE=/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
++ readonly PROFILE_FISH_SUFFIX=conf.d/nix.fish
++ PROFILE_FISH_SUFFIX=conf.d/nix.fish
++ PROFILE_FISH_PREFIXES=('/etc/fish' '/usr/local/etc/fish' '/opt/homebrew/etc/fish' '/opt/local/etc/fish')
++ readonly PROFILE_FISH_PREFIXES
++ readonly PROFILE_NIX_FILE_FISH=/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish
++ PROFILE_NIX_FILE_FISH=/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish
++ readonly NIX_INSTALLED_NIX=/nix/store/6sgbahw7h3syydivgqzwgpqbj38vh5zs-nix-2.17.1
++ NIX_INSTALLED_NIX=/nix/store/6sgbahw7h3syydivgqzwgpqbj38vh5zs-nix-2.17.1
++ readonly NIX_INSTALLED_CACERT=/nix/store/drc5pzmfi3il3h7ddi6xgq07475zj2n1-nss-cacert-3.95
++ NIX_INSTALLED_CACERT=/nix/store/drc5pzmfi3il3h7ddi6xgq07475zj2n1-nss-cacert-3.95
++ readonly EXTRACTED_NIX_PATH=/usr/share/nix/scripts
++ EXTRACTED_NIX_PATH=/usr/share/nix/scripts
++ readonly ROOT_HOME=/root
++ ROOT_HOME=/root
++ '[' -t 0 ']'
++ '[' -z '' ']'
++ readonly IS_HEADLESS=no
++ IS_HEADLESS=no
++ printf -v _UNCHANGED_GRP_FMT %b 'e[2m%=\033[0m'
++ printf -v _OLD_LINE_FMT %b 'e[1;7;31m-\033[0m \033[31m%L\033[0m'
++ printf -v _NEW_LINE_FMT %b 'e[1;7;32m+\033[0m \033[32m%L\033[0m'
++ _SERIOUS_BUSINESS='\033[31m%s:\033[0m '
++ _reminders=()
++ (( _remind_num=1 ))
++ [[ -n '' ]]
+++ mktemp -d
++ readonly SCRATCH=/tmp/tmp.cYy7iAPTV5
++ SCRATCH=/tmp/tmp.cYy7iAPTV5
++ trap finish_fail EXIT
+ is_os_linux
++ uname -s
+ '[' Linux = Linux ']'
+ return 0
+ '[' '!' -e /run/systemd/system ']'
+ readonly IS_SINGLEUSER=false
+ IS_SINGLEUSER=false
+ is_os_darwin
++ uname -s
+ '[' Linux = Darwin ']'
+ return 1
+ is_os_linux
++ uname -s
+ '[' Linux = Linux ']'
+ return 0
+ . /usr/share/nix/scripts/install-systemd-multi-user.sh
++ set -eu
++ set -o pipefail
++ readonly SERVICE_SRC=/lib/systemd/system/nix-daemon.service
++ SERVICE_SRC=/lib/systemd/system/nix-daemon.service
++ readonly SERVICE_DEST=/etc/systemd/system/nix-daemon.service
++ SERVICE_DEST=/etc/systemd/system/nix-daemon.service
++ readonly SOCKET_SRC=/lib/systemd/system/nix-daemon.socket
++ SOCKET_SRC=/lib/systemd/system/nix-daemon.socket
++ readonly SOCKET_DEST=/etc/systemd/system/nix-daemon.socket
++ SOCKET_DEST=/etc/systemd/system/nix-daemon.socket
++ readonly TMPFILES_SRC=/lib/tmpfiles.d/nix-daemon.conf
++ TMPFILES_SRC=/lib/tmpfiles.d/nix-daemon.conf
++ readonly TMPFILES_DEST=/etc/tmpfiles.d/nix-daemon.conf
++ TMPFILES_DEST=/etc/tmpfiles.d/nix-daemon.conf
++ readonly SERVICE_OVERRIDE=/etc/systemd/system/nix-daemon.service.d/override.conf
++ SERVICE_OVERRIDE=/etc/systemd/system/nix-daemon.service.d/override.conf
+ '[' -f /nix/var/nix/db/db.sqlite ']'
+ readonly IS_UPGRADE=false
+ IS_UPGRADE=false
+ . /usr/share/flox/include/install.sh
++ source /usr/share/flox/include/common.sh
+++ FLOX_INSTALL_MULTI_USER=/usr/share/nix/scripts/flox-install-multi-user.sh
+ is_root
+ '[' 0 -eq 0 ']'
+ return 0
+ flox_cure_artifacts
+ is_upgrade
+ [[ false == \t\r\u\e ]]
+ cure_artifacts
+ poly_cure_artifacts
+ :
+ for profile_target in "${PROFILE_TARGETS[@]}"
+ '[' -e /etc/bashrc ']'
+ '[' -e /etc/bashrc.backup-before-nix ']'
+ for profile_target in "${PROFILE_TARGETS[@]}"
+ '[' -e /etc/profile.d/nix.sh ']'
+ '[' -e /etc/profile.d/nix.sh.backup-before-nix ']'
+ for profile_target in "${PROFILE_TARGETS[@]}"
+ '[' -e /etc/zshrc ']'
+ '[' -e /etc/zshrc.backup-before-nix ']'
+ for profile_target in "${PROFILE_TARGETS[@]}"
+ '[' -e /etc/bash.bashrc ']'
+ '[' -e /etc/bash.bashrc.backup-before-nix ']'
+ for profile_target in "${PROFILE_TARGETS[@]}"
+ '[' -e /etc/zsh/zshrc ']'
+ '[' -e /etc/zsh/zshrc.backup-before-nix ']'
+ flox_validate_starting_assumptions
+ task 'Checking for artifacts of previous installs'
+ echo ''

+ ok '~~> Checking for artifacts of previous installs'
+ _textout '\033[32m' '~~> Checking for artifacts of previous installs'
+ echo -en '\033[32m'
e[32m+ shift
+ '[' '~~> Checking for artifacts of previous installs' = '' ']'
+ echo '~~> Checking for artifacts of previous installs'
~~> Checking for artifacts of previous installs
+ echo -en '\033[0m'
e[0m+ cat
Before I try to install, I'll check for signs Nix already is or has
been installed on this system.
+ type -P nix-env
+ for profile_target in "${PROFILE_TARGETS[@]}"
+ '[' -e /etc/bashrc.backup-before-nix ']'
+ for profile_target in "${PROFILE_TARGETS[@]}"
+ '[' -e /etc/profile.d/nix.sh.backup-before-nix ']'
+ for profile_target in "${PROFILE_TARGETS[@]}"
+ '[' -e /etc/zshrc.backup-before-nix ']'
+ for profile_target in "${PROFILE_TARGETS[@]}"
+ '[' -e /etc/bash.bashrc.backup-before-nix ']'
+ for profile_target in "${PROFILE_TARGETS[@]}"
+ '[' -e /etc/zsh/zshrc.backup-before-nix ']'
+ setup_report
+ header 'Nix config report'
+ follow=---------------------------------------------------------
++ echo '---- Nix config report ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
++ head -c 80
+ header='---- Nix config report ---------------------------------------------------------'
+ echo ''

+ _textout '\033[34m' '---- Nix config report ---------------------------------------------------------'
+ echo -en '\033[34m'
e[34m+ shift
+ '[' '---- Nix config report ---------------------------------------------------------' = '' ']'
+ echo '---- Nix config report ---------------------------------------------------------'
---- Nix config report ---------------------------------------------------------
+ echo -en '\033[0m'
e[0m+ row '        Temp Dir' /tmp/tmp.cYy7iAPTV5
+ printf '\033[1m%s\033[0m:\t%s\n' '        Temp Dir' /tmp/tmp.cYy7iAPTV5
e[1m        Temp Dire[0m:	/tmp/tmp.cYy7iAPTV5
+ row '        Nix Root' /nix
+ printf '\033[1m%s\033[0m:\t%s\n' '        Nix Root' /nix
e[1m        Nix Roote[0m:	/nix
+ row '     Build Users' 32
+ printf '\033[1m%s\033[0m:\t%s\n' '     Build Users' 32
e[1m     Build Userse[0m:	32
+ row '  Build Group ID' 30000
+ printf '\033[1m%s\033[0m:\t%s\n' '  Build Group ID' 30000
e[1m  Build Group IDe[0m:	30000
+ row 'Build Group Name' nixbld
+ printf '\033[1m%s\033[0m:\t%s\n' 'Build Group Name' nixbld
e[1mBuild Group Namee[0m:	nixbld
+ '[' '' '!=' '' ']'
+ subheader 'build users:'
+ echo ''

+ _textout '\033[4;34m' 'build users:'
+ echo -en '\033[4;34m'
e[4;34m+ shift
+ '[' 'build users:' = '' ']'
+ echo 'build users:'
build users:
+ echo -en '\033[0m'
e[0m+ row '    Username' UID
+ printf '\033[1m%s\033[0m:\t%s\n' '    Username' UID
e[1m    Usernamee[0m:	UID
++ seq 1 32
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 1
++ printf nixbld%d 1
++ nix_uid_for_core 1
++ echo 30001
+ row '     nixbld1' 30001
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld1' 30001
e[1m     nixbld1e[0m:	30001
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 2
++ printf nixbld%d 2
++ nix_uid_for_core 2
++ echo 30002
+ row '     nixbld2' 30002
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld2' 30002
e[1m     nixbld2e[0m:	30002
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 3
++ printf nixbld%d 3
++ nix_uid_for_core 3
++ echo 30003
+ row '     nixbld3' 30003
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld3' 30003
e[1m     nixbld3e[0m:	30003
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 4
++ printf nixbld%d 4
++ nix_uid_for_core 4
++ echo 30004
+ row '     nixbld4' 30004
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld4' 30004
e[1m     nixbld4e[0m:	30004
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 5
++ printf nixbld%d 5
++ nix_uid_for_core 5
++ echo 30005
+ row '     nixbld5' 30005
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld5' 30005
e[1m     nixbld5e[0m:	30005
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 6
++ printf nixbld%d 6
++ nix_uid_for_core 6
++ echo 30006
+ row '     nixbld6' 30006
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld6' 30006
e[1m     nixbld6e[0m:	30006
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 7
++ printf nixbld%d 7
++ nix_uid_for_core 7
++ echo 30007
+ row '     nixbld7' 30007
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld7' 30007
e[1m     nixbld7e[0m:	30007
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 8
++ printf nixbld%d 8
++ nix_uid_for_core 8
++ echo 30008
+ row '     nixbld8' 30008
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld8' 30008
e[1m     nixbld8e[0m:	30008
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 9
++ printf nixbld%d 9
++ nix_uid_for_core 9
++ echo 30009
+ row '     nixbld9' 30009
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld9' 30009
e[1m     nixbld9e[0m:	30009
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 10
++ printf nixbld%d 10
++ nix_uid_for_core 10
++ echo 30010
+ row '     nixbld10' 30010
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld10' 30010
e[1m     nixbld10e[0m:	30010
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 11
++ printf nixbld%d 11
++ nix_uid_for_core 11
++ echo 30011
+ row '     nixbld11' 30011
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld11' 30011
e[1m     nixbld11e[0m:	30011
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 12
++ printf nixbld%d 12
++ nix_uid_for_core 12
++ echo 30012
+ row '     nixbld12' 30012
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld12' 30012
e[1m     nixbld12e[0m:	30012
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 13
++ printf nixbld%d 13
++ nix_uid_for_core 13
++ echo 30013
+ row '     nixbld13' 30013
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld13' 30013
e[1m     nixbld13e[0m:	30013
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 14
++ printf nixbld%d 14
++ nix_uid_for_core 14
++ echo 30014
+ row '     nixbld14' 30014
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld14' 30014
e[1m     nixbld14e[0m:	30014
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 15
++ printf nixbld%d 15
++ nix_uid_for_core 15
++ echo 30015
+ row '     nixbld15' 30015
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld15' 30015
e[1m     nixbld15e[0m:	30015
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 16
++ printf nixbld%d 16
++ nix_uid_for_core 16
++ echo 30016
+ row '     nixbld16' 30016
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld16' 30016
e[1m     nixbld16e[0m:	30016
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 17
++ printf nixbld%d 17
++ nix_uid_for_core 17
++ echo 30017
+ row '     nixbld17' 30017
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld17' 30017
e[1m     nixbld17e[0m:	30017
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 18
++ printf nixbld%d 18
++ nix_uid_for_core 18
++ echo 30018
+ row '     nixbld18' 30018
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld18' 30018
e[1m     nixbld18e[0m:	30018
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 19
++ printf nixbld%d 19
++ nix_uid_for_core 19
++ echo 30019
+ row '     nixbld19' 30019
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld19' 30019
e[1m     nixbld19e[0m:	30019
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 20
++ printf nixbld%d 20
++ nix_uid_for_core 20
++ echo 30020
+ row '     nixbld20' 30020
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld20' 30020
e[1m     nixbld20e[0m:	30020
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 21
++ printf nixbld%d 21
++ nix_uid_for_core 21
++ echo 30021
+ row '     nixbld21' 30021
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld21' 30021
e[1m     nixbld21e[0m:	30021
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 22
++ printf nixbld%d 22
++ nix_uid_for_core 22
++ echo 30022
+ row '     nixbld22' 30022
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld22' 30022
e[1m     nixbld22e[0m:	30022
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 23
++ printf nixbld%d 23
++ nix_uid_for_core 23
++ echo 30023
+ row '     nixbld23' 30023
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld23' 30023
e[1m     nixbld23e[0m:	30023
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 24
++ printf nixbld%d 24
++ nix_uid_for_core 24
++ echo 30024
+ row '     nixbld24' 30024
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld24' 30024
e[1m     nixbld24e[0m:	30024
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 25
++ printf nixbld%d 25
++ nix_uid_for_core 25
++ echo 30025
+ row '     nixbld25' 30025
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld25' 30025
e[1m     nixbld25e[0m:	30025
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 26
++ printf nixbld%d 26
++ nix_uid_for_core 26
++ echo 30026
+ row '     nixbld26' 30026
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld26' 30026
e[1m     nixbld26e[0m:	30026
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 27
++ printf nixbld%d 27
++ nix_uid_for_core 27
++ echo 30027
+ row '     nixbld27' 30027
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld27' 30027
e[1m     nixbld27e[0m:	30027
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 28
++ printf nixbld%d 28
++ nix_uid_for_core 28
++ echo 30028
+ row '     nixbld28' 30028
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld28' 30028
e[1m     nixbld28e[0m:	30028
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 29
++ printf nixbld%d 29
++ nix_uid_for_core 29
++ echo 30029
+ row '     nixbld29' 30029
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld29' 30029
e[1m     nixbld29e[0m:	30029
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 30
++ printf nixbld%d 30
++ nix_uid_for_core 30
++ echo 30030
+ row '     nixbld30' 30030
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld30' 30030
e[1m     nixbld30e[0m:	30030
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 31
++ printf nixbld%d 31
++ nix_uid_for_core 31
++ echo 30031
+ row '     nixbld31' 30031
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld31' 30031
e[1m     nixbld31e[0m:	30031
+ for i in $(seq 1 "$NIX_USER_COUNT")
++ nix_user_for_core 32
++ printf nixbld%d 32
++ nix_uid_for_core 32
++ echo 30032
+ row '     nixbld32' 30032
+ printf '\033[1m%s\033[0m:\t%s\n' '     nixbld32' 30032
e[1m     nixbld32e[0m:	30032
+ echo ''

+ flox_poly_prepare_to_install
+ is_upgrade
+ [[ false == \t\r\u\e ]]
+ poly_prepare_to_install
+ :
+ '[' false = false ']'
+ flox_create_build_group
+ create_build_group
+ local primary_group_id
+ task 'Setting up the build group nixbld'
+ echo ''

+ ok '~~> Setting up the build group nixbld'
+ _textout '\033[32m' '~~> Setting up the build group nixbld'
+ echo -en '\033[32m'
e[32m+ shift
+ '[' '~~> Setting up the build group nixbld' = '' ']'
+ echo '~~> Setting up the build group nixbld'
~~> Setting up the build group nixbld
+ echo -en '\033[0m'
e[0m+ poly_group_exists nixbld
+ getent group nixbld
++ poly_group_id_get nixbld
++ getent group nixbld
++ cut -d: -f3
+ primary_group_id=993
+ '[' 993 -ne 30000 ']'
+ failure
+ header 'oh no!'
+ follow=---------------------------------------------------------
++ echo '---- oh no! ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
++ head -c 80
+ header='---- oh no! --------------------------------------------------------------------'
+ echo ''

+ _textout '\033[34m' '---- oh no! --------------------------------------------------------------------'
+ echo -en '\033[34m'
e[34m+ shift
+ '[' '---- oh no! --------------------------------------------------------------------' = '' ']'
+ echo '---- oh no! --------------------------------------------------------------------'
---- oh no! --------------------------------------------------------------------
+ echo -en '\033[0m'
e[0m+ _textout '\033[31m'
+ echo -en '\033[31m'
e[31m+ shift
+ '[' '' = '' ']'
+ cat
It seems the build group nixbld already exists, but
with the UID 993. This script can't really handle
that right now, so I'm going to give up.

You can fix this by editing this script and changing the
NIX_BUILD_GROUP_ID variable near the top to from 30000
to 993 and re-run.
+ echo -en '\033[0m'
e[0m+ echo ''

++ get_help
++ echo 'We'\''d love to help if you need it.'
++ echo ''
++ contact_us
++ echo 'You can open an issue at'
++ echo 'https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md'
++ echo ''
++ echo 'Or get in touch with the community: https://nixos.org/community'
+ _textout '\033[31m' 'We'\''d love to help if you need it.

You can open an issue at
https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md

Or get in touch with the community: https://nixos.org/community'
+ echo -en '\033[31m'
e[31m+ shift
+ '[' 'We'\''d love to help if you need it.

You can open an issue at
https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md

Or get in touch with the community: https://nixos.org/community' = '' ']'
+ echo 'We'\''d love to help if you need it.

You can open an issue at
https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md

Or get in touch with the community: https://nixos.org/community'
We'd love to help if you need it.

You can open an issue at
https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md

Or get in touch with the community: https://nixos.org/community
+ echo -en '\033[0m'
e[0m+ flox_exit_error
+ set +x

Revert to Debian’s nix packages, install flox under “Nix - Generic”

…it seems like the installation failure for Debian’s packages (above) was a red herring. After a reboot nix seems to be working fine.

So, since flox’s .deb is now uninstallable for me, I decide to use the
“Nix - Generic” installation option.

I am greeting with this warning on the install instructions page:

Please ensure you are using Nix version 2.18.0 or greater.

Bug: how am I supposed to check the nix version? How am I

My nix --version command prints 2.8.0 yet my flox installation works
fine. When I had flox installed, nix --version printed something like 2.17.1, which also doesn’t satisfy 2.18. So, I am left confused by this.

wow thank you so much for the detailed write up. we’re taking a look…

few things!

  1. we have some improvements planned to the “Nix - Generic” documentation. Specifically clarifying a flake-based way of installing Flox that makes more sense if you aren’t using profiles. Here’s a preview of that change, would love your thoughts if you’re willing to check it out! (click “Nix - Generic” to see the updated instructions) Install Flox - Flox Docs
  2. I don’t know we enforce the nix version check but we definitely don’t test on nix versions < 2.18 so it would be good to update if you have more random problems (especially with editing environments, installing packages, activating environments).
  3. we are making improvements as fast as we can to the Linux installers. This post was an inspiration! Thank you for sharing it. (Forward looking statement disclaimer) I’m hoping we can get them in before our next release but we will see. If not that one, the one later this month.