Hyprland: error adding a file to a tree builder

Then the nix run nix... flake update command won’t do anything to help.

Try

nix run github:nixos/nixpkgs/nixos-24.11#nixVersions.nix_2_18 -- build /path/to/your/config/dir#nixosConfigurations.$(hostname).config.system.build.toplevel
sudo result/bin/switch-to-configuration switch

EDIT: to be clear, only replace /path/to/your/config/dir, everything else is literal.