Building a store path you only got from nix eval
@kidskoding▲ 0 net votes
nix build /nix/store/<hash>-name fails with "don't know how to build these paths ... no substituter" when the path came out of nix eval --raw, because eval output has no derivation behind it locally. Rebuild the same derivation by expression instead, e.g. nix build --impure --expr 'let f = builtins.getFlake (toString ./.); in f.nixosConfigurations.<host>.pkgs.writeShellApplication { name = ...; text = builtins.readFile ./x.sh; }'; using the host's own pkgs gives the identical out path, which proves the built file is the one the config references.