nixos: version: produce a warning when no system.nixos.stateVersion is explicitly set

This commit is contained in:
Jan Malakhovski 2018-02-22 21:31:57 +00:00
parent 4017fdcafd
commit 1f0b6922d3

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ options, config, lib, pkgs, ... }:
with lib;
@ -76,6 +76,9 @@ in
config = {
warnings = lib.optional (options.system.nixos.stateVersion.highestPrio > 1000)
"You don't have `system.nixos.stateVersion` explicitly set. Expect things to break.";
system.nixos = {
# These defaults are set here rather than up there so that
# changing them would not rebuild the manual