Recently Written · git

waybase

Bootable installer: KISS, Gentoo, Arch or Alpine + Nix + a Wayland compositor (sway, river, labwc, dwl)

git clone https://github.com/equwal/waybase

Log | Files | Refs


commit 17e53708d3bbc5e4bd5c1e48cafcb3c7d0c9986d
equwal <13551856+equwal@users.noreply.github.com>
2026-10-04 01:47:46 -0700

Create nixbld users before registering the Nix store

nix-env refused to run because build-users-group did not exist yet (Arch).

 install.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/install.sh b/install.sh
index 65ffae8..e276d48 100644
--- a/install.sh
+++ b/install.sh
@@ -164,8 +164,6 @@ if ! nix_native; then
     mv $M$T/store/* $M/nix/store/
     NIX=$(cd $M/nix/store && ls -d ./*-nix-"$NV" | head -1); NIX=/nix/store/${NIX#./}
     CA=$(cd $M/nix/store && ls -d ./*-nss-cacert-* | head -1); CA=/nix/store/${CA#./}
-    ch "$NIX/bin/nix-store --load-db < $T/.reginfo && $NIX/bin/nix-env -p /nix/var/nix/profiles/default -i $NIX $CA" >/dev/null
-    rm -rf "$M$T"
     if ! grep -q '^nixbld:' $M/etc/group; then
         members=""
         i=1; while [ $i -le 32 ]; do
@@ -176,6 +174,8 @@ if ! nix_native; then
         done
         echo "nixbld:x:30000:$members" >> $M/etc/group
     fi
+    ch "$NIX/bin/nix-store --load-db < $T/.reginfo && $NIX/bin/nix-env -p /nix/var/nix/profiles/default -i $NIX $CA" >/dev/null
+    rm -rf "$M$T"
     ch "chgrp nixbld /nix/store && chmod 1775 /nix/store"
 fi
 nix_service