commit e9583801d6136cc7bae9d0cfc5748da7cb056833 equwal <13551856+equwal@users.noreply.github.com> 2026-10-04 11:09:27 -0700 KISS: Nix dbus config and PATH; Gentoo: respect USE for binpkgs, build kernel packages
backends/gentoo.sh | 6 ++++-- backends/kiss.sh | 2 +- install.sh | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/backends/gentoo.sh b/backends/gentoo.sh index 9c4bcc5..6226cbc 100644 --- a/backends/gentoo.sh +++ b/backends/gentoo.sh @@ -3,7 +3,7 @@ # OpenRC, elogind, dbus, dhcpcd, gentoo-kernel-bin + dracut. # shellcheck shell=sh disable=SC2034 GENTOO_MIRROR=${GENTOO_MIRROR:-https://distfiles.gentoo.org} -E="emerge --quiet --getbinpkgonly --usepkgonly --noreplace" +E="emerge --quiet --getbinpkgonly --usepkgonly --binpkg-respect-use=y --noreplace" bootstrap() { b=$GENTOO_MIRROR/releases/amd64/autobuilds f=$(curl -fsSL "$b/latest-stage3-amd64-desktop-openrc.txt" | grep -o '^[^# ]*stage3[^ ]*\.tar\.xz' | head -1) @@ -43,7 +43,9 @@ boot_cmd() { } kernel() { fw=sys-kernel/linux-firmware; [ "${FIRMWARE:-}" = no ] && fw="" - ch "$E sys-kernel/installkernel $fw sys-kernel/gentoo-kernel-bin" >/dev/null + # No binhost build of installkernel[dracut] or gentoo-kernel-bin; both only unpack prebuilt files, so nothing compiles. + ch "emerge --quiet --getbinpkg --usepkg --binpkg-respect-use=y --noreplace sys-kernel/installkernel" >/dev/null + ch "emerge --quiet --getbinpkg --usepkg --binpkg-respect-use=y --noreplace $fw sys-kernel/gentoo-kernel-bin" >/dev/null KERNEL=$(cd $M/boot && ls vmlinuz-* | tail -1) INITRD=$(cd $M/boot && ls initramfs-* | tail -1) KARGS="" diff --git a/backends/kiss.sh b/backends/kiss.sh index 920b6b4..f77125e 100644 --- a/backends/kiss.sh +++ b/backends/kiss.sh @@ -36,7 +36,7 @@ EOF } pkg() { :; } pkg_install() { return 1; } -extra_pkgs() { echo seatd eudev; } +extra_pkgs() { echo seatd eudev dbus; } user_add() { ch "adduser -D -s /bin/sh $1" for g in wheel video input audio; do ch "addgroup $1 $g" 2>/dev/null || true; done diff --git a/install.sh b/install.sh index 2bc7e26..cb95638 100644 --- a/install.sh +++ b/install.sh @@ -191,7 +191,7 @@ cat > $M/etc/profile.d/waybase.sh <<EOF for f in /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh /etc/profile.d/nix-daemon.sh.nix; do [ -r "\$f" ] && . "\$f" && break done -export PATH="\$HOME/.nix-profile/bin:$NIXP/bin:\$PATH" +export PATH="$HOME/.nix-profile/bin:$NIXP/bin:/nix/var/nix/profiles/default/bin:$PATH" export XDG_DATA_DIRS="$NIXP/share:\${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" if [ "\$(id -u)" -ne 0 ] && [ -z "\${WAYLAND_DISPLAY:-}" ] && [ "\$(tty)" = /dev/tty1 ]; then exec waybase-session @@ -225,6 +225,8 @@ if [ -n "$fromnix" ]; then EOF } boot_cmd "ln -sfn $NIXP /run/opengl-driver" + # Nix's dbus reads /etc/dbus-1/session.conf, and the store copy includes it back: drop that line. + case " $fromnix " in *" dbus "*) mkdir -p $M/etc/dbus-1; ch "sed '/etc.dbus-1.session.conf/d' $NIXP/share/dbus-1/session.conf > /etc/dbus-1/session.conf" ;; esac fi echo "$fromnix" > $M/etc/waybase-from-nix set -- $COMPOSITOR