docs: add systemd type change to 19.03 release notes

This commit is contained in:
Robert Helgesson 2019-04-23 22:02:29 +02:00
parent 13ad532412
commit ba0375bf06
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -33,6 +33,32 @@ home.file."my file".source = ./. + "/file with spaces!";
</programlisting>
</para>
</listitem>
<listitem>
<para>
The type used for the systemd unit options under
<option>systemd.user.services</option>,
<option>systemd.user.sockets</option>, etc. has been changed to offer more
robust merging of configurations. If you don't override values within
systemd units then you are not affected by this change. Unfortunately, if
you do override unit values you may encounter errors.
</para>
<para>
In particular, if you get an error saying that a <quote>unique
option</quote> is <quote>defined multiple times</quote> then you need to
use the
<code xlink:href="https://nixos.org/nixos/manual/#sec-option-definitions-setting-priorities">mkForce</code>
function. For example,
<programlisting language="nix">
systemd.user.services.foo.Service.ExecStart = "/foo/bar";
</programlisting>
becomes
<programlisting language="nix">
systemd.user.services.foo.Service.ExecStart = lib.mkForce "/foo/bar";
</programlisting>
We had to make this change because the old merging was causing too many
confusing situations for people.
</para>
</listitem>
</itemizedlist>
</section>