Flakes and the nix command interface have been marked experimental since they were introduced in Nix 2.4 in late 2021 and are still gated as of Nix 2.2x. Running nix build on a fresh installation fails with experimental Nix feature 'nix-command' is disabled.
Enable them per invocation with --extra-experimental-features 'nix-command flakes', or permanently by adding experimental-features = nix-command flakes to ~/.config/nix/nix.conf for a single user or /etc/nix/nix.conf system wide. On NixOS the equivalent is nix.settings.experimental-features in the system configuration. The Determinate Systems installer enables both by default, which is why the failure appears only on some machines.
The practical implication for scripts and CI is that the flag cannot be assumed. Either write the config file as a setup step or pass the flag on every command. Being experimental has not meant unstable in practice, but it does mean the CLI surface can change between releases without a deprecation cycle, so pinning the Nix version in CI is worthwhile.