mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
Add stateVersion option
This commit is contained in:
parent
d87275a4f8
commit
6c80065616
3 changed files with 37 additions and 0 deletions
|
|
@ -24,6 +24,9 @@
|
||||||
#unzip
|
#unzip
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Read the changelog before changing this value
|
||||||
|
system.stateVersion = "19.09";
|
||||||
|
|
||||||
# After installing home-manager channel like
|
# After installing home-manager channel like
|
||||||
# nix-channel --add https://github.com/rycee/home-manager/archive/master.tar.gz home-manager
|
# nix-channel --add https://github.com/rycee/home-manager/archive/master.tar.gz home-manager
|
||||||
# nix-channel --update
|
# nix-channel --update
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,6 @@
|
||||||
./environment/path.nix
|
./environment/path.nix
|
||||||
./home-manager.nix
|
./home-manager.nix
|
||||||
./user.nix
|
./user.nix
|
||||||
|
./version.nix
|
||||||
<nixpkgs/nixos/modules/misc/assertions.nix>
|
<nixpkgs/nixos/modules/misc/assertions.nix>
|
||||||
]
|
]
|
||||||
|
|
|
||||||
33
modules/version.nix
Normal file
33
modules/version.nix
Normal file
|
|
@ -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.
|
||||||
|
</para><para>
|
||||||
|
The <emphasis>state version</emphasis> 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.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue