diff --git a/pkgs/nomarchy-install/nomarchy-install.sh b/pkgs/nomarchy-install/nomarchy-install.sh index 0d7b27d..de0e730 100644 --- a/pkgs/nomarchy-install/nomarchy-install.sh +++ b/pkgs/nomarchy-install/nomarchy-install.sh @@ -464,10 +464,13 @@ success "System installed (bootloader in place)" # fully themed desktop, not bare Hyprland. Best-effort: a failure here # only costs the user one `home-manager switch` after logging in. section "Baking the desktop" -cat > /mnt/tmp/nomarchy-hm-activate.sh < /mnt/root/nomarchy-hm-activate.sh < /var/log/nomarchy-hm-preactivate.log 2>&1 export PATH=/run/current-system/sw/bin:\$PATH -export NIX_CONFIG=$(printf '%q' "$NIX_CONFIG") out=\$(nix --extra-experimental-features "nix-command flakes" \ build --no-link --print-out-paths \ --option substituters "" \ @@ -476,13 +479,15 @@ install -d -o "$USERNAME" -g users /nix/var/nix/profiles/per-user/$USERNAME install -d -o "$USERNAME" -g users /nix/var/nix/gcroots/per-user/$USERNAME runuser -u "$USERNAME" -- bash -lc "USER=$USERNAME HOME=/home/$USERNAME \$out/activate" EOF -if nixos-enter --root /mnt -- bash /tmp/nomarchy-hm-activate.sh; then +if nixos-enter --root /mnt -- bash /root/nomarchy-hm-activate.sh; then success "Desktop pre-activated — first boot is fully themed" else - warn "Desktop pre-activation failed; after first login run:" + warn "Desktop pre-activation failed (see /var/log/nomarchy-hm-preactivate.log" + warn "on the installed system); after first login run:" warn " home-manager switch --flake ~/.nomarchy -b bak" + tail -n 5 /mnt/var/log/nomarchy-hm-preactivate.log 2>/dev/null || true fi -rm -f /mnt/tmp/nomarchy-hm-activate.sh +rm -f /mnt/root/nomarchy-hm-activate.sh header "Nomarchy installed on $TARGET_DISK" \ "User: $USERNAME @ $HOSTNAME_" \