system.stateVersion: default or config.selfprivacy.stateVersion

This commit is contained in:
Alexander Tomokhov 2023-12-22 23:04:03 +04:00
parent a185dd1e3e
commit 5bd15a768a
2 changed files with 5 additions and 2 deletions

View file

@ -78,7 +78,9 @@
"# Completely remove remnants of NIXOS_LUSTRATE."
"R! /old-root"
];
system.stateVersion = config.selfprivacy.stateVersion;
system.stateVersion =
lib.mkIf (config.selfprivacy.stateVersion != null)
config.selfprivacy.stateVersion;
system.autoUpgrade = {
enable = config.selfprivacy.autoUpgrade.enable;
allowReboot = config.selfprivacy.autoUpgrade.allowReboot;

View file

@ -36,7 +36,8 @@ with lib;
};
stateVersion = mkOption {
description = "State version of the server";
type = types.str;
type = types.nullOr types.str;
default = null;
};
########################
# Server admin options #