aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2018-01-27 10:17:42 +0100
committerRobert Helgesson <robert@rycee.net>2018-01-27 10:22:54 +0100
commita154e2ea1a53da4b6edfcd565db315dc5246032b (patch)
tree14111665a7e22018dd6e4ca43949024b9fdfa14a /README.md
parent5fe8d574ca3e44556d1277a0c50c2dfef714d2b7 (diff)
readme: add basic rollback instructions
Diffstat (limited to 'README.md')
-rw-r--r--README.md38
1 files changed, 36 insertions, 2 deletions
diff --git a/README.md b/README.md
index 7c7d4b12386..3e19c1c9a55 100644
--- a/README.md
+++ b/README.md
@@ -25,8 +25,8 @@ distributions and NixOS versions.
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
-it yourself (you can attempt to run the activation script for the
-desired generation).
+it yourself. See the [rollbacks](#rollbacks) section for instructions
+on how to manually perform a rollback.
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.
@@ -186,6 +186,40 @@ examples run
$ 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
-----------------------------