I am getting errors like this:
building the system configuration...
Copied "/nix/store/73l80gfxnnchah2dzd97w42dc71dv4vx-systemd-257.6/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/systemd/systemd-bootx64.efi".
Copied "/nix/store/73l80gfxnnchah2dzd97w42dc71dv4vx-systemd-257.6/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/BOOT/BOOTX64.EFI".
⚠️ Mount point '/boot' which backs the random seed file is world accessible, which is a security hole! ⚠️
⚠️ Random seed file '/boot/loader/random-seed' is world accessible, which is a security hole! ⚠️
Random seed file /boot/loader/random-seed successfully refreshed (32 bytes).
Created EFI boot entry "Linux Boot Manager".
failed to synthesize: failed to read /nix/store/22i3lzk6b9vxs2ifxp1lap1wh907z1b7-user-environment/nixos-version: No such file or directory (os error 2)
Traceback (most recent call last):
File "/nix/store/miw88xwkbkip8p715sm1k6kc9x02i2nw-systemd-boot/bin/systemd-boot", line 431, in <module>
main()
~~~~^^
File "/nix/store/miw88xwkbkip8p715sm1k6kc9x02i2nw-systemd-boot/bin/systemd-boot", line 414, in main
install_bootloader(args)
~~~~~~~~~~~~~~~~~~^^^^^^
File "/nix/store/miw88xwkbkip8p715sm1k6kc9x02i2nw-systemd-boot/bin/systemd-boot", line 361, in install_bootloader
remove_old_entries(gens)
~~~~~~~~~~~~~~~~~~^^^^^^
File "/nix/store/miw88xwkbkip8p715sm1k6kc9x02i2nw-systemd-boot/bin/systemd-boot", line 243, in remove_old_entries
bootspec = get_bootspec(gen.profile, gen.generation)
File "/nix/store/miw88xwkbkip8p715sm1k6kc9x02i2nw-systemd-boot/bin/systemd-boot", line 124, in get_bootspec
boot_json_str = run(
~~~^
[
^
...<6 lines>...
stdout=subprocess.PIPE,
^^^^^^^^^^^^^^^^^^^^^^^
).stdout
^
File "/nix/store/miw88xwkbkip8p715sm1k6kc9x02i2nw-systemd-boot/bin/systemd-boot", line 58, in run
return subprocess.run(cmd, check=True, text=True, stdout=stdout)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/sd81bvmch7njdpwx3lkjslixcbj5mivz-python3-3.13.4/lib/python3.13/subprocess.py", line 577, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/nix/store/wpbfvilnaw00cxj61vsg74i0b106g3cb-bootspec-1.0.1/bin/synthesize', '--version', '1', '/nix/var/nix/profiles/system-207-link', '/dev/stdout']' returned non-zero exit status 1.
Failed to install bootloader
Command '['systemd-run', '-E', 'LOCALE_ARCHIVE', '-E', 'NIXOS_INSTALL_BOOTLOADER', '--collect', '--no-ask-password', '--pipe', '--quiet', '--service-type=exec', '--unit=nixos-rebuild-switch-to-configuration', PosixPath('/nix/store/p0zs8r46svd7i2livbfq0s7a2glxyahy-nixos-system-nixos-25.11.20250619.08f2208/bin/switch-to-configuration'), 'switch']' returned non-zero exit status 1.
In this one ^, I also passed the --boot-loader flag just to see. I am not sure how to address this or what caused it.
If I do sudo nixos-rebuild build --show-trace --flake nixfiles/#sour
, it gives me this error that inidcates it can’t run the build command either:
building the system configuration...
error: flake 'git+file:///home/sour/nixfiles' does not provide attribute 'packages.x86_64-linux.nixosConfigurations."sour".config.system.build.toplevel', 'legacyPackages.x86_64-linux.nixosConfigurations."sour".config.system.build.toplevel' or 'nixosConfigurations."sour".config.system.build.toplevel'
Command '['nix', '--extra-experimental-features', 'nix-command flakes', 'build', '--print-out-paths', 'git+file:///home/sour/nixfiles#nixosConfigurations."sour".config.system.build.toplevel', '--show-trace']' returned non-zero exit status 1.