trace: warning: system.stateVersion is not set, defaulting to 22.05. Read why this matters on https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion.
$ nix-instantiate --eval '<nixos/nixos>' -A config.system.stateVersion
error: file 'nixos/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)
$ nix-instantiate --eval '<nixpkgs/nixos>' -A config.system.stateVersion
error: file 'nixos-config' was not found in the Nix search path (add it using $NIX_PATH or -I)
at /var/src/nixpkgs/nixos/default.nix:1:60:
1| { configuration ? import ./lib/from-env.nix "NIXOS_CONFIG" <nixos-config>
| ^
2| , system ? builtins.currentSystem
(use '--show-trace' to show detailed location information)
$ echo $NIX_PATH
nixpkgs=/var/src/nixpkgs:nixpkgs-unstable=/var/src/nixpkgs-unstable:nixpkgs-mozilla=/var/src/nixpkgs-mozilla
Well, I have no idea how that works, so I know no way to verify that what you think is your entry point really is, or that the option is actually being set when evaluated.
You’re certainly evaluating some kind of nixos module here, whether it’s the same one krops is using, I still don’t know.
Here’s an idea: change your stateVersion from "21.05" to builtins.trace "yes, we really evaluated this" "21.05" and see if you get that trace output on a normal rebuild of the machine in question.
yes, but krops also deploys your channel sources e.g. nixpkgs-stable… whatever you specify. I deploy nixos-22.11 and nixos-unstable for example. The system is built from nixos-22.11 and some packages are installed from nixos-unstable.
Krops is more or less what flakes is today, but krops was available years ago. Also, builds get executed on the target rather than on the host that starts the deploy.