Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7fb6e4af36a1
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 902d102c8537
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Jan 7, 2020

  1. Improve documentation for stateVersion

    The meaning of stateVersion often leads to a lot of confusion. This
    commit trys to improve that situation.
    maralorn committed Jan 7, 2020
    Copy the full SHA
    c1d7850 View commit details

Commits on Jan 10, 2020

  1. Merge pull request #77279 from maralorn/stateVersion-docs

    Improve documentation for stateVersion
    nh2 authored Jan 10, 2020
    Copy the full SHA
    902d102 View commit details
Showing with 15 additions and 6 deletions.
  1. +6 −4 nixos/modules/installer/tools/tools.nix
  2. +9 −2 nixos/modules/misc/version.nix
10 changes: 6 additions & 4 deletions nixos/modules/installer/tools/tools.nix
Original file line number Diff line number Diff line change
@@ -159,10 +159,12 @@ in
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
# };
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "${config.system.nixos.release}"; # Did you read the comment?
}
11 changes: 9 additions & 2 deletions nixos/modules/misc/version.nix
Original file line number Diff line number Diff line change
@@ -61,11 +61,18 @@ in
configuration defaults in a way incompatible with stateful
data. For instance, if the default version of PostgreSQL
changes, the new version will probably be unable to read your
existing databases. To prevent such breakage, you can set the
existing databases. To prevent such breakage, you should set the
value of this option to the NixOS release with which you want
to be compatible. The effect is that NixOS will option
to be compatible. The effect is that NixOS will use
defaults corresponding to the specified release (such as using
an older version of PostgreSQL).
It‘s perfectly fine and recommended to leave this value at the
release version of the first install of this system.
Changing this option will not upgrade your system. In fact it
is meant to stay constant exactly when you upgrade your system.
You should only bump this option, if you are sure that you can
or have migrated all state on your system which is affected
by this option.
'';
};