Nixos-rebuild is taking ridiculously

i just updated my flake inputs and i am using 26.05 branch, and i didn’t benefit from the cache.nixos.org at all, here’s a list of the packages that will be built locally:

these 82 derivations will be built:
/nix/store/f8jnjhlz49p7byi1065bw1nvywvvh4aq-sdl3-3.4.10.drv
/nix/store/aj5krg50hgif5d204d3wn64q17j7rgf7-sdl2-compat-2.32.68.drv
/nix/store/07p021g0bpy4vxhwnmh9pa7hjq2aq6vd-ffmpeg-7.1.4.drv
/nix/store/0by5kzsm1x8k9gdqs8qypk582i26ymfv-smpeg2-unstable-2022-05-26.drv
/nix/store/0xr0ibizyngjdpb271w6bhckz7nadjvy-SDL2_mixer-2.8.2.drv
/nix/store/a8lz44al60akghs03x4gikpqysf9xh3i-python3.13-afdko-4.0.2.drv
/nix/store/c2q103chdfpj7a6wljlx8v28sz7ahs3m-nototools-0.3.2.drv
/nix/store/a4fq89qqzdrfm90rcdkp74261vyxk8f4-noto-fonts-color-emoji-2.051.drv
/nix/store/a00dx326qchhg51m462p4g0gsf9ahcla-steam-run-1.0.0.85-fhsenv-rootfs.drv
/nix/store/1clzs4law1zjjy52xkibjc32ir316yl2-steam-run-1.0.0.85-bwrap.drv
/nix/store/1c6ms722s37b95bdh88r0gpac0zykfwx-steam-run-1.0.0.85.drv
/nix/store/wrp37mripswqll34zwf4crw2ckzp2a17-SDL2_image-2.8.12.drv
/nix/store/adwj6pl224287m0mnb4kp3qycgi7bv1c-qemu-10.2.2.drv
/nix/store/gylpfliibsdkp16a84314xm4h7ad3578-ffmpeg-8.1.1.drv
/nix/store/xwp4z5yixcxf0xncqcz8xrijpsrg8pah-gpu-screen-recorder-5.13.8.drv
/nix/store/1ky4zv4w40ihv2qni9snv4jhh41bxqi8-ensure-all-wrappers-paths-exist.drv
/nix/store/s90nav0lj1vjy78kqrip8km8ww380h77-qemu-ovmf-metadata.drv
/nix/store/84kqjlby08wrvwsk3jbviffywn7mnppp-nixos-tmpfiles.d.drv
/nix/store/1w6y149ccckrb7c8jz4izmd52pmwkpw0-tmpfiles.d.drv
/nix/store/g8n6djykg57xr89napasckx6dvl577yf-onnxruntime-1.24.4.drv
/nix/store/i8jjkivhcjpm8mpd9rkzgnvv7zmxwfqp-firefox-unwrapped-152.0.1.drv
/nix/store/7ifqxqckxlb12q36fy7wb7nhl2q2jqlm-firefox-152.0.1.drv
/nix/store/2j100zc0c4hyw4ifdkzqrzc82pxabfza-user-environment.drv
/nix/store/qfn91j712vy7q9dqbfqp6p6dhrq7fgrn-qtmultimedia-6.11.1.drv
/nix/store/jhv096dpvw4drn1rflk5v6smqgbkizd3-qtspeech-6.11.1.drv
/nix/store/r02y3i2ii2l1li0x57f31b5scx96b129-qtwebengine-6.11.1.drv
/nix/store/s3h1m9iyg459zc83iwh3560g7z65d72h-qtwebview-6.11.1.drv
/nix/store/w10ym7792nqiyrramylp6gwq6ay648v4-qt3d-6.11.1.drv
/nix/store/b7iva2rclzz9drh4cv4igwdg6rlv8asj-pyside6-6.11.0.drv
/nix/store/432w90mv9aws1mgg3z9a2bvld0m7gq2v-kguiaddons-6.26.0.drv
/nix/store/5j1iji0di7l2457wv65d2c8xmb8y7vkx-font-dirs.drv
/nix/store/n73hx5920s1f3s6j19pk1f7p3ci4s51j-fc-cache.drv
/nix/store/y8v3r8agzw5fsbxd9iz9dnnwwxg02sj5-fc-00-nixos-cache.conf.drv
/nix/store/46a18z3x39798nmw4pgja1r1kllwfi3x-fontconfig-conf.drv
/nix/store/4bb9w45i9ncchg81p3i9faqjsjpqpdsp-alsa-plugins-1.2.12.drv
/nix/store/y6q68q43q41wi4n3j184vg4kkmiw6fqx-espeak-ng-1.52.0.1-unstable-2025-09-09.drv
/nix/store/brwf2wihkqqwwqywq4qrdjpf5q5a1rxs-speech-dispatcher-0.12.1.drv
/nix/store/s6s3jvmlmc4bxj2y8m4n891a3fin6gk8-SDL2_ttf-2.24.0.drv
/nix/store/vvn8sxnyd78yvlai61ls551s0s8kz7dh-appimage-run-fhsenv-rootfs.drv
/nix/store/y8hvzyc0nmj2pbpa5ji1q1yc6a5gi4a8-appimage-run-bwrap.drv
/nix/store/d3y1aqs0ckh6fjrajqbamx6wi1dhvsj5-appimage-run.drv
/nix/store/g1v6ziy4pb56jj1bbvr5q09m1ba6b32w-thunderbird-unwrapped-151.0.1.drv
/nix/store/j6zkdsxnn152sa9y4hpslv519xib96sc-thunderbird-151.0.1.drv
/nix/store/6azg7bfzkq9zwy20rkg3ij9m6aqld1gn-OVMF-202602.drv
/nix/store/kif4blh056w0fi2y9ag5dbv9apw7jn8g-qemu-10.2.2.drv
/nix/store/pzvbqvkid96rrfbqigz0df6a4k7wnq3a-quickemu-4.9.9.drv
/nix/store/r3gkmc7bihr4lyp129yx7pw5wqva09la-pinentry-qt-1.3.2.drv
/nix/store/vj5r1564j9f86bdv36dy02xjbhw763dx-quickgui-1.2.10.drv
/nix/store/dmmm7alm6f0nai4mgrw3ds6m7wbs8ckm-steam-1.0.0.85-fhsenv-rootfs.drv
/nix/store/qmkkw3mhpib65cs4gh7h5dbza1l8v6vz-steam-1.0.0.85-bwrap.drv
/nix/store/xpz2pr8zr7hivgz8c3fikw16a64zanc4-steam-1.0.0.85.drv
/nix/store/zyaxdzb1gsbkr7armbcmaylsrw80hqm2-qemu-host-cpu-only-10.2.2.drv
/nix/store/bxxrr08qgn4im1923zddlwa3skgfdvch-system-path.drv
/nix/store/7bppk49p9qk9ykc8vvcydk1j763ncz8p-system-generators.drv
/nix/store/97197a777svnv8iysqcii6xzgr45q91q-system-shutdown.drv
/nix/store/q73rv1zhkbkndxk80caaksypq8iwy1v9-dbus-1.drv
/nix/store/z8hz8jgc8pfdi0pk77wxhnvbjpkljp95-X-Restart-Triggers-dbus-broker.drv
/nix/store/g14gqxn4yrv931v3g4d2h7k66qlsa79q-unit-dbus-broker.service.drv
/nix/store/b77mmgiza25hd1p49m6ipaq790bkjc1f-user-units.drv
/nix/store/gmhhf59mxgzrgs533h83gdffm5jhsycf-user-generators.drv
/nix/store/66kvr3n9yr9fqsdykwg3dczlvdb1zp4b-X-Restart-Triggers-systemd-tmpfiles-resetup.drv
/nix/store/5fvnm417m48a71mnjx27f9qxsn5vaa6a-unit-systemd-tmpfiles-resetup.service.drv
/nix/store/x34sngjcvx5lnwmgdpiaay8833fy0c0g-X-Restart-Triggers-polkit.drv
/nix/store/i8al5x60cg9rkv9n8m83mgb94d3p541j-unit-polkit.service.drv
/nix/store/g5gdll4nsric6lw9bqqx1jc06gymf5w9-security-wrapper-gsr-kms-server-x86_64-unknown-linux-musl.drv
/nix/store/qhqba6z3fc7iijf8z1q8bpqxng4aq3cl-security-wrapper-qemu-bridge-helper-x86_64-unknown-linux-musl.drv
/nix/store/jm97vdk28n86mydjhgqsk75mwdk88w2r-unit-script-suid-sgid-wrappers-start.drv
/nix/store/j3p0qc0cq90q7ipf5clx85hpd0a0w29g-unit-suid-sgid-wrappers.service.drv
/nix/store/pl1bykfig06fz4ig69pd44hsn2hx5cni-unit-qemu-guest-agent.service.drv
/nix/store/kz3xwvh6krm3y7vcda4fxn1l3hcbd9da-unit-script-libvirtd-config-start.drv
/nix/store/q2s1r97qwl9r19caqfi0mjnxhpvv0pyg-unit-libvirtd-config.service.drv
/nix/store/qm1f7ck7zrxzpm96ch00mbqb1dnzqngh-unit-libvirtd.service.drv
/nix/store/w28cmaaar3s7iv8n0nn9q6qp0hna37ds-unit-dbus-broker.service.drv
/nix/store/j47xfq9c4y626cgd84vvd041sx5grvj0-system-units.drv
/nix/store/sl8vi522h8xxz6vly3sihpnfl8vmpg4r-neatvnc-1.0.0.drv
/nix/store/y5mw6f6w5619xihnnfdg70fn94rbvdgb-freerdp-3.27.1.drv
/nix/store/zdxrzbdj3wkqgrr2kb2hfl0vs1amjhjv-weston-15.0.1.drv
/nix/store/rlzj8fjdkzvq5sjzkb5niccb9wf1ywdj-sddm.conf.drv
/nix/store/zs9mprfp965j23klrx3r7gl51vrp3jnz-fontconfig-etc.drv
/nix/store/jax7imx5h6qfwfrmlrja79zj5qdbibrs-etc.drv
/nix/store/rdigjfy8fmw5sia2i5m785i6dfkzzz5v-activate.drv
/nix/store/55myh6dar7zcy8hw3mmx480xgzpa8j0j-nixos-system-nixos-26.05.20260623.667d5cf.drv

i also have questions to why i am using ffmpeg 7.1.4 and 8.1.1

Because there is a package you have included that depends on the older version, so it must be available.

I suggest you use the nh tool for rebuilding. Then you can see what is actually being locally built and what is being downloaded from cache.nixos.org.

i still rebuilding rn lol, and yes those are the package that will be built locally, i did know buy running this command: nix build .#nixosConfigurations.nixos.config.system.build.toplevel --dry-run–no-link
i got a different output now:
26 derivations will be built
0 paths will be fetched

onnxruntime-1.24.4
firefox-unwrapped-152.0.1
firefox-152.0.1
thunderbird-unwrapped-151.0.1
thunderbird-151.0.1
qtmultimedia-6.11.1
qtspeech-6.11.1
qtwebengine-6.11.1
qtwebview-6.11.1
qt3d-6.11.1
pyside6-6.11.0
kguiaddons-6.26.0
pinentry-qt-1.3.2

sure i’ll use nh in the future

  • are you using some sort of overlay that affect these packages?
  • are you using the nixpkgs master branch instead of the nixos-unstable branch?
1 Like

Also there were some known issues lately, ref this and this

2 Likes

Notably, those will be the packages that actually take forever to build. If you don’t care whether the NixOS foundation or Mozilla ship your binaries, you can use the -bin variants of those packages to sidestep issues like this.

Almost any other package will take a few minutes at worst to build locally, so you should never have any issues that way.

Though you are giving up on reproducible builds for these packages, and just rely on downloading third binaries; most real-world desktop use cases probably don’t care about this in practice.