diff options
Diffstat (limited to 'nixos/modules/misc/version.nix')
-rw-r--r-- | nixos/modules/misc/version.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix index 8f246a9278b7..fc0d65d5148e 100644 --- a/nixos/modules/misc/version.nix +++ b/nixos/modules/misc/version.nix @@ -1,9 +1,10 @@ -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: with lib; let cfg = config.system.nixos; + opt = options.system.nixos; in { @@ -53,6 +54,7 @@ in stateVersion = mkOption { type = types.str; default = cfg.release; + defaultText = literalExpression "config.${opt.release}"; description = '' Every once in a while, a new NixOS release may change configuration defaults in a way incompatible with stateful |