diff --git a/configuration.nix b/configuration.nix index fc8365f..ad22b24 100644 --- a/configuration.nix +++ b/configuration.nix @@ -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; diff --git a/selfprivacy-module.nix b/selfprivacy-module.nix index 268153a..b0fa077 100644 --- a/selfprivacy-module.nix +++ b/selfprivacy-module.nix @@ -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 #