nixos/switch-to-configuration: reload user units

When rebuilding you have to manually run `systemctl --user
daemon-reload`. It gathers all authenticated users using
`loginctl list-user` and runs `daemon-reload` for each of them.

This is a first step towards a `nixos-rebuild` which is able to reload
user units from systemd. The entire task is fairly hard, however I
consider this patch usable as it allows to restart units without running
`daemon-reload` for each authenticated user.
This commit is contained in:
Maximilian Bosch
2018-08-14 13:38:18 +02:00
parent 249ba3d3ed
commit fc2bde6d7a
2 changed files with 19 additions and 0 deletions
@@ -422,6 +422,13 @@ inherit (pkgs.nixos {
The module option <option>nix.useSandbox</option> is now defaulted to <literal>true</literal>.
</para>
</listitem>
<listitem>
<para>
The config activation script of <literal>nixos-rebuild</literal> now
<link xlink:href="https://www.freedesktop.org/software/systemd/man/systemctl.html#Manager%20Lifecycle%20Commands">reloads</link>
all user units for each authenticated user.
</para>
</listitem>
</itemizedlist>
</section>
</section>