When i tried use flakes, i gotten this error
error: path '/nix/store/vdm6gh64h05845sk68p7blsyf7c1d3s8-linux-6.12.30-modules-shrunk/lib' is not in the Nix store
What is i need do?
My configuration is here: dotfiles/flake.nix at 83a6fcc709395690ec8a34960b7c4a6d520c36c9 · dvetutnev/dotfiles · GitHub
FWIW, I can build the toplevel configuration locally.
exact command used to reproduce
noglob nom build --no-link --print-out-paths --print-build-logs -v --show-trace github:dvetutnev/dotfiles?rev=83a6fcc709395690ec8a34960b7c4a6d520c36c9#nixosConfigurations.kysa.config.system.build.toplevel
(adjust for your shell and use the nix command directly if you’re not using nom)
Result: /nix/store/3a55sf8r9m2hbib1z707i39lflqw4i6m-nixos-system-kysa-25.11.20250525.62b852f
Which does include: /nix/store/vdm6gh64h05845sk68p7blsyf7c1d3s8-linux-6.12.30-modules-shrunk
Since the flake does use the nixos-unstable branch it is very unlikely that the path was not yet on the (usual) binary cache at the time.
A failure to download the path from the binary cache would have also been a bit more vocal about it, and would’ve probably tried to build it locally.
There is a different discourse thread which seems very similar which seems to pinpoint the issue to the nix-daemon being older than what is present in the shell used to build the system.
When i tried use flakes, i gotten this error
If the above thread doesn’t help you further, a bit more context would be helpful.
How did you use the flake?
Was it something like nixos-rebuild switch --flake
or nix build
?
Can you still reproduce the issue, and if so, could you provide the full output, ideally with -v
?
Also (in light of the mentioned thread), which nix and nix-daemon versions are you running?
If using nixos-rebuild
the version of the nix CLI shouldn’t matter much since it reexecs itself into a newer version (see the --fast
option which notably disables this).
The following two commands should provide that information:
# nix version
nix --version
# nix daemon info
systemctl show nix-daemon.service --property ExecStart
[nix-shell:~]$ systemctl show nix-daemon.service --property ExecStart --no-pager
ExecStart={ path=/nix/store/497nw8l4vhs9vjpzkvdwh1yd0rphxkdh-nix-2.18.5/bin/nix-daemon ; argv[]=nix-daemon --daemon ; ignore_errors=no ; start_time=[Wed 2025-05-28 16:37:08 UTC] ; stop_time=[n/a] ; pid=1774 ; code=(null) ; status=0/0 }
[nix-shell:~]$ nix --version
nix (Nix) 2.18.5
Changing nixpkgs branch to nixos-25.05 doesnt help me. For build configuration i
am using this command:
nixos-rebuild --flake ./path_to_dotfiles#kysa build
Here if full log with -v
arg:
[nix-shell:~]$ sudo nixos-rebuild --flake ./dotfiles#kysa build -v --show-trace
building the system configuration...
Building in flake mode.
$ nix --extra-experimental-features nix-command flakes build ./dotfiles#nixosConfigurations."kysa".config.system.build.toplevel -v --show-trace
warning: Git tree '/home/dvetutnev/dotfiles' is dirty
Using saved setting for 'extra-substituters = https://nix-community.cachix.org' from ~/.local/share/nix/trusted-settings.json.
Using saved setting for 'extra-trusted-public-keys = nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=' from ~/.local/share/nix/trusted-settings.json.
these 151 derivations will be built:
/nix/store/06a0m1m1l0ba0g8g5p5c7a72wn8cc18f-unit-hyperv-daemons.target.drv
/nix/store/07pzxj7kvf2nhpj4ixvsrjiv27zbwc3i-unit-run-initramfs.mount.drv
/nix/store/097snaayvipqvrsx2zf2s6rqcd8hzpgy-unit-script-post-resume-start.drv
/nix/store/0bbfgn90gppknfbdavywn05id6c0g0cw-unit-systemd-mkswap-.service.drv
/nix/store/chnpkyrkp6d20iq6bavlsr6gpwwbjb8p-nixos-help.drv
/nix/store/dfmj7bwdn4n2qs078lz389094gdxi35i-nixos-help.drv
/nix/store/ny3651rl2g1bjpdil5szl5v5jn6qlwar-nixos-generate-config.drv
/nix/store/r4qpishz27zl9a2wdppr6wq1armizkd4-nixos-rebuild.drv
/nix/store/zk1sx97rjk6i87d8p602nvn4z2nxgs5j-nixos-version.drv
/nix/store/3ww0q3ngw84bnzmiggvww6pfrk0d78p2-system-path.drv
/nix/store/0bw9f45yadzyxz2jz11da7ifygg8hcqj-dbus-1.drv
/nix/store/0k87lc98d3nj0ni8cv8ssyn1z0h6incx-unit-fs.target.drv
/nix/store/4b5a3b1lh0nrki6xch78n4z2cc1i2q60-unit-script-mysql-pre-start.drv
/nix/store/55r4b23x3avzm3chsyc7zz9zax5j3qxi-unit-script-mysql-start.drv
/nix/store/hklbyhmy7hgd38wmcs8rkppaa3zcacd9-unit-script-mysql-post-start.drv
/nix/store/111fya716nkmdlgmjjrh8y2sa3w2iykq-unit-mysql.service.drv
/nix/store/14qs9y53hymc90dzcjsq98zh2mfz3gkr-unit-logrotate.timer.drv
/nix/store/1a8a2693m1dx3kjc44zbqpbj9h66qjx8-system-generators.drv
/nix/store/1anvpapfwny6aa7hmdqnc9cybqdqpaff-unit-keys.target.drv
/nix/store/1aqbdbrl111nhb73gjyv6yjgws5pd0my-unit-post-resume.service.drv
/nix/store/g0h4v0c95hrbiv027x4hl5yxjk6i5rhb-unit-script-wireguard-wg0-peer-evhkt5ajjtm9uLH2enPJ0mtSFsmD4YCtEmeK52PcESk--x3d-post-stop.drv
/nix/store/jj543p2ahvppmckhw1hr18jvjmri085z-unit-script-wireguard-wg0-peer-evhkt5ajjtm9uLH2enPJ0mtSFsmD4YCtEmeK52PcESk--x3d-start.drv
/nix/store/1ds85wll445z2k3kmmafcg9m5p6zikjq-unit-wireguard-wg0-peer-evhkt5ajjtm9uLH2enPJ0mtSFsmD4YCtEmeK52PcESk-x3d.service.drv
/nix/store/9y3dcalr5p3ih2iffdwddxkgkmwnpwgv-unit-script-suid-sgid-wrappers-start.drv
/nix/store/1ymx8lhffgzv8vg2i1jvy3d3n3qxrmi4-unit-suid-sgid-wrappers.service.drv
/nix/store/211x57z5gr933r87p04cgnm145854vc4-X-Restart-Triggers-dbus.drv
/nix/store/dmq6lsczsqhs1l1kpclzmgi6vvqn04xh-nix.conf.drv
/nix/store/l55pd9a1f1s5hbdxsjard9npkxps21fb-X-Restart-Triggers-nix-daemon.drv
/nix/store/23a5xlhrmrj8hg2gyw5g135ccflrf0dd-unit-nix-daemon.service.drv
/nix/store/24iyd9i32kjjj1m43vd15qgw73605gzs-unit-script-container_-post-start.drv
/nix/store/2676bdad2wg166srpqzcz0jad32r67hy-unit-user-runtime-dir-.service.drv
/nix/store/2h8jl1nvhdcx4n9h984cqbzyha0p8rv4-unit-console-getty.service-disabled.drv
/nix/store/2kr0hfp0yfm2frphdpqmvd71p337g7if-unit-mount-pstore.service.drv
/nix/store/2sayf92z4v56zmpcxxgwqqkaxdypns1h-unit-logrotate-checkconf.service.drv
/nix/store/2z451d66697m7zdq7hlm055g1z44wk17-unit-sysinit-reactivation.target.drv
/nix/store/388hg6glzgks65cxcc4bxczjrmvpnr2r-unit-script-acme-setup-start.drv
/nix/store/3f7a5y1i0lvy2jp8ahvl5ja6ny2x3hzv-unit-systemd-importd.service.drv
/nix/store/3np3phadv29j0gd78siab65rmp94wg3x-unit-systemd-timedated.service.drv
/nix/store/3p0hx793c08ch8i52jqgf32slx3w1pxn-unit-script-systemd-timesyncd-pre-start.drv
/nix/store/3vvzvzl57mf07lpn15j033gga0ai2lxw-unit-script-network-addresses-ens3-pre-stop.drv
/nix/store/3x25ga4w13pca6mqf4jkaf8hwp9mag5d-vlock.pam.drv
/nix/store/56xxwv4jqwi5g5157c6yw7jisn1i8gkx-unit-dbus.socket.drv
/nix/store/9053wd87wwhwrhvcfcyhgjazb25h7fmn-unit-systemd-tmpfiles-setup.service.drv
/nix/store/f6xrwm47phqskifpyi076l3yrz67h4z2-unit-nixos-fake-graphical-session.target.drv
/nix/store/ppnq333f0fqfc9dx0sd7xna0msmmag4w-unit-dbus.service.drv
/nix/store/9kyx1zizm3gjc6r4x6i1xi31a4zpkp4i-unit-script-nixos-activation-start.drv
/nix/store/vygbqw6ky5i2xcb7zydh4b4sp72j6vlp-unit-nixos-activation.service.drv
/nix/store/3ywaqaf4513i401vv1pmmk35pn36s4hc-user-units.drv
/nix/store/4570av9y5kjhrnd9nlq397l2wj3h0gwi-unit-systemd-fsck-.service.drv
/nix/store/47s6gqrfsjcxs5frmikz8azl0i2dkq4h-unit-getty-.service.drv
/nix/store/4b871kj3k9yfzars8bphi1z85qcp2zc3-unit-acme-setup.service.drv
/nix/store/k4q5bm5iz5yanc86712db1rl5mzxdxg1-unit-script-prepare-kexec-start.drv
/nix/store/4fvh2c3jrxzj7d9yga1fij4m170m7rcg-unit-prepare-kexec.service.drv
/nix/store/4zh5cbw7ixzi0bbmyvighy6qdjd2rxgb-unit-systemd-random-seed.service.drv
/nix/store/8abvpz8445fqa80n5df4cfdjzlcwfnhk-wg-key.drv
/nix/store/a5ipjik73jg1jx6l2y5m10pcbqrlilk5-unit-script-wireguard-wg0-start.drv
/nix/store/njhjdyrp13ziaykqz688frxksq03f6d0-unit-script-wireguard-wg0-post-stop.drv
/nix/store/5781h0fafg765pk3n67v41nq4xyba8f8-unit-wireguard-wg0.service.drv
/nix/store/5g8gsffvdf0nr6hll9i82l9rifyb8990-unit-systemd-sysctl.service.drv
/nix/store/5hbhildhny5pqzd121zyyl6sx7nk9f28-unit-systemd-backlight-.service.drv
/nix/store/6fsr9k4pnspqpdnhs4yys6p9pvd3gp3v-unit-systemd-nspawn-.service.drv
/nix/store/74ymzbh7ka4jf34s6f3fybnwjf7c3g0w-unit-audit.service.drv
/nix/store/j9ffr04bawnswnim61ngl1mbigs5bazc-unit-script-nix-gc-start.drv
/nix/store/7l2n6ahf4r9kpszy5izx14wh4nh619x0-unit-nix-gc.service.drv
/nix/store/7ls76qzyb28gig3yfymyyjc3xxjygd55-unit-user-.service.drv
/nix/store/7piikr3ffnjz2rqqpdbcqp94nf7lwkdg-unit-systemd-remount-fs.service.drv
/nix/store/8q3bsr9srwqwqw1nvii7gnw435apmgpw-unit-systemd-logind.service.drv
/nix/store/91jlh3y6zriijl9py31h6hxn873a9xm7-unit-nginx-config-reload.service.drv
/nix/store/9kyyiy9sfm8grcv9wmjznwmnwaxsaj5i-unit-docker.service.drv
/nix/store/9m6xip8baiqv1594syb02x5c6d4i9zaa-unit-logrotate.service.drv
/nix/store/9y7siy20bknjssrsz8a5ggvshr7bp255-unit-systemd-makefs-.service.drv
/nix/store/ahvi67fdiqmkqagjc9m933slsnkg2n9v-unit-nscd.service.drv
/nix/store/f50bw53fgmcy789bb8gg81vrd5cf0jbq-unit-script-sshd-keygen-start.drv
/nix/store/akfhaxjp4zm92zwvf5m9vaa51j1qkns3-unit-sshd-keygen.service.drv
/nix/store/ar8yga2y1cmcv9n85jgndpvbjb37216m-unit-kmod-static-nodes.service.drv
/nix/store/as0y7h6ghavkdivzdcp452if5mlhp9qa-unit-systemd-timesyncd.service.drv
/nix/store/b3rfscdd7sp6abphgnw30a1b2q0b0dpf-unit-system.slice.drv
/nix/store/b4f50kvwvxzapsjpyzv38ib5rfw7jwjn-unit-docker.socket.drv
/nix/store/b86hq0ciqa4c43bdpl8g56jljbnl6i65-unit-sshd-.service.drv
/nix/store/b89w7sb0czsw58f84vfcf4176rlpy0i5-unit-sshd.service.drv
/nix/store/dsrm54ddwqdq5z1lg122d6ls5srz4dji-unit-syncthing.service.drv
/nix/store/f2hxb1h0n2xs2qz6rwxh7r1brq5khc50-unit-systemd-user-sessions.service.drv
/nix/store/g8r10z25394yivgx55m6jqgxliavf6s8-unit-docker-prune.service.drv
/nix/store/mjxnrii8w5gpkx12qw442s67qlbhp51q-unit-script-wireguard-wg0-peer-Ceu6BGh88do--x2bxdNMHH0pE6YGkzXXXPA7G8GUvMK0hVA--x3d-post-stop.drv
/nix/store/r5qi6irfx6qd3ynbd1jvn544kpkf71d8-unit-script-wireguard-wg0-peer-Ceu6BGh88do--x2bxdNMHH0pE6YGkzXXXPA7G8GUvMK0hVA--x3d-start.drv
/nix/store/gs0as46yaw72y8y0cvqsb49q7ba3py4r-unit-wireguard-wg0-peer-Ceu6BGh88do-x2bxdNMHH0pE6YGkzXXXPA7G8GUvMK0hVA-x3d.service.drv
/nix/store/j736w6p0741ha1cdfw0hnyc9mg80vrja-unit-script-pre-sleep-start.drv
/nix/store/h8nviclk83jh2i69j2ki1qdk6kxbnni0-unit-pre-sleep.service.drv
/nix/store/hhal1kkqn1zhfx3bna7wckhlsw6pchq8-unit-network-local-commands.service-disabled.drv
/nix/store/7hlpkjqkwzsyprm6aw30w6vbagc8a0pc-unit-script-resolvconf-start.drv
/nix/store/hn6mnh9prb3cdcc746wm6yyg6hc40k4n-unit-resolvconf.service.drv
/nix/store/i05zjvbd15y0g859jl075i9nmvwjizm4-unit-acme-kysa.me.timer.drv
/nix/store/ixs18a1l3ali03va94glfd7rqwy071q5-unit-remote-fs.target.drv
/nix/store/j428w4qna7a8mnkvcvpxmkxvdy1vxzx9-unit-post-resume.target.drv
/nix/store/jaq8w5580a165ymm20yjrp7wrz4c7d5w-unit-systemd-update-utmp.service.drv
/nix/store/javrmhjdv06k66ixf7dgik81zfzml7a0-unit-systemd-journald-.service.drv
/nix/store/jkl1c99j5x3xm9krx4qxbszcl752ni7z-unit-autovt-.service.drv
/nix/store/jx4wkpckllmbkj1wnqq01ajdjf78gvav-unit-systemd-pstore.service.drv
/nix/store/pbykrldjv0fi5cy0vk4c39an4mlavdrj-unit-script-container_-start.drv
/nix/store/wlfr5i80krb2yyrswrc3zk8p690bycq2-unit-script-container_-pre-start.drv
/nix/store/jxfzx2izaqp0pr58n8jj545as8canr1r-unit-container-.service.drv
/nix/store/k344hwid1f0nwclivpcm9f50xxj2dffd-unit-fail2ban.service.drv
/nix/store/kb52bd0krs6lpqrdlrchqx7dh5yqn8i6-unit-dbus.service.drv
/nix/store/kr8qpdbyjxs9wvwwfr8r80ls38xczgj4-unit-nix-optimise.service.drv
/nix/store/kv3jy079b1h51lv5mhmcd7px6lwa9kwd-unit-multi-user.target.drv
/nix/store/kz3sgq3i9y92m8si2x35md12g7w2v2g6-unit-systemd-journald.service.drv
/nix/store/l0v0xkp4kw26lw7fm1gj9872zfqp9lzx-unit-systemd-oomd.service.drv
/nix/store/smg0w4v22dyl8hdfxbb79zjsd7v1gfml-unit-script-network-setup-start.drv
/nix/store/l3wwwfxi0wrcsfq87hs8q7p6qv40f3n6-unit-network-setup.service.drv
/nix/store/laiggfhkp0bh5nc3vss9qalp3nmgnzjj-unit-save-hwclock.service.drv
/nix/store/lapmf95d1cbc9j07vw9391w42yqi38pc-unit-systemd-udev-settle.service.drv
/nix/store/mkllzkgqs5rmqf0qnri6vv3h93ll5rf9-unit-local-fs.target.drv
/nix/store/fh87395yy2b1zsi99sizgs7db6x0k7i4-vconsole.conf.drv
/nix/store/44kamb984xyxryacb9c6p9pr4rn2rqc6-X-Restart-Triggers-reload-systemd-vconsole-setup.drv
/nix/store/mpm8a5afhh840akvldrh9bll618sdvsv-unit-reload-systemd-vconsole-setup.service.drv
/nix/store/iwihbrcmamy336q0zj6a37nbac9qg7gj-etc-os-release.drv
/nix/store/5lbbcnwyvnnawdhj2xrd6dfcf1k6l58i-shutdown-ramfs-contents.json.drv
/nix/store/p3iyz0zsabfwqfbykm688jzsr94937xc-unit-generate-shutdown-ramfs.service.drv
/nix/store/pjjs8nkpzqw8r6a4vy1pza1667wwlg47-unit-user-.slice.drv
/nix/store/pyxqgw0gn8x6cdkf4b2bwvd2230jjc6l-unit-wireguard-wg0.target.drv
/nix/store/q07dfzrbqfwkbxp662m96r5y9hzp6qsh-unit-systemd-udevd.service.drv
/nix/store/q6kbjsfw4fqdzc7lb8523khn8m5g2216-unit-container-getty-.service.drv
/nix/store/rggb759bjz40z7l90xnijlq6nn4g3pdm-unit-firewall.service.drv
/nix/store/6alrk3lrpda12lbqgkd1a5zgw9lks52r-unit-script-network-addresses-ens3-start.drv
/nix/store/sd46ha5pylarkyyl9dppyazpjc1srp0g-unit-network-addresses-ens3.service.drv
/nix/store/sl9vq28c5vvns2rmh0b6sk5a1chnbmsz-unit-run-wrappers.mount.drv
/nix/store/sqaczxa9svn38kfqsi57r0s28lyrv2mf-unit-systemd-modules-load.service.drv
/nix/store/wv0c3aan6vri38cjl0ixpcagfr665zrl-unit-serial-getty-.service.drv
/nix/store/lkv7aqkmmiz62s7ivrpkhzhh7yd47pq1-nixos-tmpfiles.d.drv
/nix/store/f32flr087rw8djwmb36zgq77gqfl835v-tmpfiles.d.drv
/nix/store/ln0z8p12zcs58hl2j9rdzhlnzh3sp0vs-X-Restart-Triggers-systemd-tmpfiles-resetup.drv
/nix/store/x3i31ss2dvkbg452g3xq96pd5mvplq9n-unit-systemd-tmpfiles-resetup.service.drv
/nix/store/xamyvlpxr2yf6ch40nq4rsln6ayhm445-unit-systemd-journal-flush.service.drv
/nix/store/xhmjv1ypj9kgy34ywaslaqw5b21a5xrp-unit-systemd-journald-audit.socket.drv
/nix/store/xy629z8fa5m6k8hipn6239ibn6r99bqg-unit-nix-daemon.socket.drv
/nix/store/crsqzl151s1kywqs0qcx1wwk5jk3swvy-unit-script-acme-kysa.me-start.drv
/nix/store/y015q6dx2pimys39xxr9419smlwvf98d-unit-acme-kysa.me.service.drv
/nix/store/9kkzxjbqcf3i1ad029lrsf148r2q895f-unit-script-nginx-pre-start.drv
/nix/store/yysvklh26yb8hv30b4mgy67k9dyp8ixq-unit-nginx.service.drv
/nix/store/yyvb7kvzpm55pl326fwhsxvjdvvrxi2k-unit-fstrim.timer.drv
/nix/store/4vbysisd4x9ldr019jfrf3mw0n99iax7-unit-script-acme-selfsigned-kysa.me-start.drv
/nix/store/zc7x4a8idrryjrlnmzk55w58zjxv1nsx-unit-acme-selfsigned-kysa.me.service.drv
/nix/store/8jzmk3qla7lx0ix5clanzpjp4hlq4fsc-system-units.drv
/nix/store/9ylyh21lc8ai0xw9kjddfi8b1vq88say-system-shutdown.drv
/nix/store/mnafln47l6lavbg6ddw3614hhjg39pxn-issue.drv
/nix/store/qndyic0qi22x5p5lvmc5ckavq5y74sy8-user-generators.drv
/nix/store/42khinz5i6a4n5skqksh7bnj25myk01g-etc.drv
/nix/store/h453a4cpygvjrv4sp7825vw4pp2l84s7-closure-info.drv
/nix/store/jx03xqbcs4qkssxg2s77mnskwisl2x2d-initrd-linux-6.12.30.drv
/nix/store/84nmiaawsw6k0mr4fsdgr5zdlrzfy755-boot.json.drv
/nix/store/snc0638am7b5rb8ds1nc790pnp6qn2x5-nixos-system-kysa-25.05.20250526.7848cd8.drv
this path will be fetched (7.40 MiB download, 34.28 MiB unpacked):
/nix/store/hncmkpnp1y067whz74vgpr4zqqhixh87-docker-27.5.1
copying path '/nix/store/hncmkpnp1y067whz74vgpr4zqqhixh87-docker-27.5.1' from 'https://cache.nixos.org'...
building '/nix/store/iwihbrcmamy336q0zj6a37nbac9qg7gj-etc-os-release.drv'...
error: path '/nix/store/vdm6gh64h05845sk68p7blsyf7c1d3s8-linux-6.12.30-modules-shrunk/lib' is not in the Nix store
Ah, yes, that seems to be the affected version which seems bugged (the linked thread).
I don’t have 2.18.5 around so I can’t easily test this.
Upgrading your system to an older or newer version should work (if you still have an older generation lying around you could temporarily switch to that and then upgrade from there), but I can see the chicken-egg problem with having to upgrade your system to build your system configuration.
One hack that might work would be to run nix copy --from https://cache.nixos.org /nix/store/vdm6gh64h05845sk68p7blsyf7c1d3s8-linux-6.12.30-modules-shrunk
and then try to build, but I don’t know what exactly the issue is.
If all else fails you could pull a new version of nix via nix shell
(or similar), then stop the nix-daemon.service
and run the following as root:
# first check that your nix version is not 2.18.5, if it is, run `nix shell github:NixOS/nixpkgs/nixos-unstable#nix`
nix --version
# this does effectively what `nixos-rebuild` does; it builds the toplevel output and writes it to a new version of the system profile
# the important bit here is `--store local` which forces nix to ignore the daemon and work on the store manually (that's also why you should stop the daemon before doing that, just to be safe)
nix build --store local --no-link --print-out-paths --print-build-logs -v --show-trace --profile /nix/var/nix/profiles/system ./path_to_dotfiles#nixosConfiguration.kysa.config.system.build.toplevel
# this is the "other" step in the nixos-rebuild activation which does not just activate the system, but also writes any `boot` configuration (like generating bootloader configuration), without this the new generation built above wouldn't be picked up after a reboot, despite being the most current (except for some specific boot configurations that use the profile directly, such as the mobile-nixos stuff)
/nix/var/nix/profiles/system/bin/switch-to-configuration switch
Thank you very much!
I did sequentially upgrade system 24.05 → 24.11 → 25.05. This solved my problem.
1 Like