1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-01 04:23:34 +02:00
home-manager/doc/release-notes/rl-2003.adoc
Robert Helgesson 86be605f3f
files: manage static files in state directory
This improves atomicity since all files managed by Home Manager will
immediately switch over when the link

  $XDG_DATA_HOME/home-manager/files

is swapped over to the new generation. Removing obsolete files and
adding new ones must still done non-atomically but this improves the
situation significantly.
2020-03-30 23:59:46 +02:00

112 lines
3.5 KiB
Plaintext

[[sec-release-20.03]]
== Release 20.03 (unreleased)
This is the current unstable branch and the information in this
section is therefore not final.
[[sec-release-20.03-highlights]]
=== Highlights
This release has the following notable changes:
* Assigning a list to the <<opt-home.file>>, <<opt-xdg.configFile>>,
and <<opt-xdg.dataFile>> options is now deprecated and will produce a
warning message if used. Specifically, if your configuration currently
contains something like
+
[source,nix]
----
home.file = [
{
target = ".config/foo.txt";
text = "bar";
}
]
----
+
then it should be updated to instead use the equivalent attribute set form
+
[source,nix]
----
home.file = {
".config/foo.txt".text = "bar";
}
----
+
Support for the list form will be removed in Home Manager version
20.09.
* The `lib` function attribute given to modules is now enriched with
an attribute `hm` containing extra library functions specific for Home
Manager. More specifically, `lib.hm` is now the same as `config.lib`
and should be the preferred choice since it is more robust.
+
Therefore, if your configuration makes use of, for example,
`config.lib.dag` to create activation script blocks, it is recommended
to change to `lib.hm.dag`.
+
Note, in the unlikely case that you are
+
** using Home Manager's NixOS or nix-darwin module,
** have made your own Home Manager module containing an top-level
option named `config` or `options`, and
** assign to this option in your system configuration inside a plain
attribute set, i.e., without a function argument,
+
then you must update your configuration to perform the option
assignment inside a `config` attribute. For example, instead of
+
[source,nix]
----
home-manager.users.jane = { config = "foo"; };
----
+
use
+
[source,nix]
----
home-manager.users.jane = { config.config = "foo"; };
----
* The `services.compton` module has been deprecated and instead the
new module `services.picom` should be used. This is because Nixpkgs no
longer packages compton, and instead packages the (mostly) compatible
fork called picom.
* Entries in <<opt-home.file>> are now linked into place via an
intermediate location, `$XDG_DATA_HOME/home-manager/files`, much like
`/etc/static` in NixOS. This change was made to makes the switch
process more atomic.
+
In general this should not be noticeable but if you manually activate
an older generation it may (harmlessly) exit with an error along the
lines of
+
....
Existing file '/home/jane/foo' is in the way
Please move the above files and try again or use -b <ext> to move automatically.
....
+
where `/home/jane/foo` is a file managed through the <<opt-home.file>>
option. This is due to the older activation script not recognizing the
new XDG data home path as belonging to Home Manager. You can resolve
this by manually removing the `/home/jane/foo` symbolic link and
running the activate script again.
[[sec-release-20.03-state-version-changes]]
=== State Version Changes
The state version in this release includes the changes below. These
changes are only active if the `home.stateVersion` option is set to
"20.03" or later.
* The <<opt-programs.zsh.history.path>> option is no longer prepended
by `$HOME`, which allows specifying absolute paths, for example,
using the xdg module. Also, the default value is fixed to
`$HOME/.zsh_history` and `dotDir` path is not prepended to it
anymore.
* The newsboat module will now default in displaying `queries` before `urls` in
its main window. This makes sense in the case when one has a lot of URLs and
few queries.