diff --git a/modules/build/initial-build/nix-on-droid.nix.default b/modules/build/initial-build/nix-on-droid.nix.default index 7695cbb..85756c6 100644 --- a/modules/build/initial-build/nix-on-droid.nix.default +++ b/modules/build/initial-build/nix-on-droid.nix.default @@ -24,6 +24,9 @@ #unzip ]; + # Read the changelog before changing this value + system.stateVersion = "19.09"; + # After installing home-manager channel like # nix-channel --add https://github.com/rycee/home-manager/archive/master.tar.gz home-manager # nix-channel --update diff --git a/modules/module-list.nix b/modules/module-list.nix index 36f0993..e851cc6 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -11,5 +11,6 @@ ./environment/path.nix ./home-manager.nix ./user.nix + ./version.nix ] diff --git a/modules/version.nix b/modules/version.nix new file mode 100644 index 0000000..630bf19 --- /dev/null +++ b/modules/version.nix @@ -0,0 +1,33 @@ +# Licensed under GNU Lesser General Public License v3 or later, see COPYING. +# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS. + +{ config, lib, pkgs, ... }: + +with lib; + +{ + + ###### interface + + options = { + + system.stateVersion = mkOption { + type = types.enum [ "19.09" ]; + default = "19.09"; + description = '' + It is occasionally necessary for nix-on-droid to change + configuration defaults in a way that is incompatible with + stateful data. This could, for example, include switching the + default data format or location of a file. + + The state version indicates which default + settings are in effect and will therefore help avoid breaking + program configurations. Switching to a higher state version + typically requires performing some manual steps, such as data + conversion or moving files. + ''; + }; + + }; + +}