systemd: use sd-switch

This makes the systemd module use the sd-switch application to perform
the unit switch during a generation activation.

Since the closure of sd-switch is relatively lightweight we
unconditionally pull it in as a dependency. We simultaneously remove
the `systemd.user.startServices` option and perform the switch action
automatically.

PR #1388
This commit is contained in:
Robert Helgesson 2020-07-07 00:35:28 +02:00
parent 152769aed9
commit 9c0fe3957b
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
5 changed files with 39 additions and 344 deletions

View file

@ -1619,6 +1619,21 @@ in
A new module is available: 'services.dropbox'.
'';
}
{
time = "2020-08-03T22:34:42+00:00";
condition = hostPlatform.isLinux && (with config.systemd.user;
services != {} || sockets != {} || targets != {} || timers != {});
message = ''
The systemd activation is now handled by 'sd-switch', a program that
stops, starts, reloads, etc. systemd units as necessary to match the
new Home Manager configuration.
Since sd-switch is relatively lightweight it is always used and the
option 'systemd.user.startServices' is therefore considered obsolete
and can be removed from your configuration.
'';
}
];
};
}