I am using NixOps to deploy a server. Before the first nixops deploy
, the server NixOS version was 19.09
and NixOps successfully noticed that:
$ nixops --version
NixOps 1.7
$ nixops show-physical -d mydeployment
{
server = { config, lib, pkgs, ... }: {
config = {
boot.kernelModules = [];
networking = {
extraHosts = "127.0.0.1 applicationServer-encrypted\n";
firewall.trustedInterfaces = [];
vpnPublicKey = "ssh-ed25519 […] NixOps VPN key of server";
};
system.stateVersion = ( lib.mkDefault "19.09" );
};
imports = [
{
config.users.extraUsers.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 […] NixOps client key for server"
];
}
];
};
}
The value is indeed 19.09
:
$ nixops info -d mydeployment
[…]
Nix path: -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.09-small.tar.gz
[…]
$ nixops show-option -d mydeployment server system.stateVersion
"19.09"
However, when I use the nixos-20.03-small
channel, the value is changed to 20.03
:
$ nixops info -d mydeployment
[…]
Nix path: -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-20.03-small.tar.gz
[…]
$ nixops show-option -d mydeployment server system.stateVersion
"20.03"
I do not set system.stateVersion
in my deployment files. Why doesn’t the value stay at 19.09
?