mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
readme: add basic rollback instructions
This commit is contained in:
parent
5fe8d574ca
commit
a154e2ea1a
1 changed files with 36 additions and 2 deletions
38
README.md
38
README.md
|
@ -25,8 +25,8 @@ distributions and NixOS versions.
|
||||||
|
|
||||||
Also, the `home-manager` tool does not explicitly support rollbacks at
|
Also, the `home-manager` tool does not explicitly support rollbacks at
|
||||||
the moment so if your home directory gets messed up you'll have to fix
|
the moment so if your home directory gets messed up you'll have to fix
|
||||||
it yourself (you can attempt to run the activation script for the
|
it yourself. See the [rollbacks](#rollbacks) section for instructions
|
||||||
desired generation).
|
on how to manually perform a rollback.
|
||||||
|
|
||||||
Now when your expectations have been built up and you are eager to try
|
Now when your expectations have been built up and you are eager to try
|
||||||
all this out you can go ahead and read the rest of this text.
|
all this out you can go ahead and read the rest of this text.
|
||||||
|
@ -186,6 +186,40 @@ examples run
|
||||||
$ man home-configuration.nix
|
$ man home-configuration.nix
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Rollbacks
|
||||||
|
---------
|
||||||
|
|
||||||
|
While the `home-manager` tool does not explicitly support rollbacks at
|
||||||
|
the moment it is relatively easy to perform one manually. The steps to
|
||||||
|
do so are
|
||||||
|
|
||||||
|
1. Run `home-manager generations` to determine which generation you
|
||||||
|
wish to rollback to:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ home-manager generations
|
||||||
|
2018-01-04 11:56 : id 765 -> /nix/store/kahm1rxk77mnvd2l8pfvd4jkkffk5ijk-home-manager-generation
|
||||||
|
2018-01-03 10:29 : id 764 -> /nix/store/2wsmsliqr5yynqkdyjzb1y57pr5q2lsj-home-manager-generation
|
||||||
|
2018-01-01 12:21 : id 763 -> /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation
|
||||||
|
2017-12-29 21:03 : id 762 -> /nix/store/6c0k1r03fxckql4vgqcn9ccb616ynb94-home-manager-generation
|
||||||
|
2017-12-25 18:51 : id 761 -> /nix/store/czc5y6vi1rvnkfv83cs3rn84jarcgsgh-home-manager-generation
|
||||||
|
…
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Copy the Nix store path of the generation you chose, e.g.,
|
||||||
|
|
||||||
|
/nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation
|
||||||
|
|
||||||
|
for generation 763.
|
||||||
|
|
||||||
|
3. Run the `activate` script inside the copied store path:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ /nix/store/mv960kl9chn2lal5q8lnqdp1ygxngcd1-home-manager-generation/activate
|
||||||
|
Starting home manager activation
|
||||||
|
…
|
||||||
|
```
|
||||||
|
|
||||||
Keeping your ~ safe from harm
|
Keeping your ~ safe from harm
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue