State Version
Every NixOS host and every Home Manager user records a state version — the release it was first initialised under. It is not the version you run; it pins the release whose stateful defaults (data directories, database layouts, service formats) the system keeps honouring across upgrades, so an upgrade never migrates that state under you unexpectedly.
Because it should be the same everywhere and rarely changes, the baseline sets both sides once, through its base concept, so a consuming configuration never has to:
system.stateVersion(NixOS) insystem/state-version.nixhome.stateVersion(Home Manager) inuser/state-version.nix
Both use lib.mkDefault, so a host can still override them.