From d166c854b6ecfd9ada520439b06f7eb9e3e4be7c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 27 Jul 2015 19:46:36 +0200 Subject: Add option system.stateVersion This option requests compatibility with older NixOS releases with respect to stateful data, in cases where new releases have defaults that might be incompatible with system state of existing NixOS deployments. For instance, if we change the default version of PostgreSQL, existing deployments will break if the new version can't read databases created by the old version. So for example, setting system.stateVersion = "15.07"; requests that options like services.postgresql.package use defaults corresponding to the 15.07 release branch. Note that nixos-generate-config emits this option. (In the future, NixOps may set system.stateVersion to the NixOS release in use when the machine was created.) See also #7939 for another motivating example. --- nixos/modules/installer/tools/tools.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'nixos/modules/installer/tools/tools.nix') diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix index 99a74b6d59ed..61744c39d601 100644 --- a/nixos/modules/installer/tools/tools.nix +++ b/nixos/modules/installer/tools/tools.nix @@ -40,6 +40,7 @@ let src = ./nixos-generate-config.pl; path = [ pkgs.btrfsProgs ]; perl = "${pkgs.perl}/bin/perl -I${pkgs.perlPackages.FileSlurp}/lib/perl5/site_perl"; + inherit (config.system) nixosRelease; }; nixos-option = makeProg { -- cgit 1.4.1