Can notifications be started from a systemd unit? Kind of. notify-send
can be invoked from systemd, but getting the correct user notified is non-trivial and I'm not sure how it would be done on NixOS.
Can nixos-rebuild
have a progress bar? Not really. It's not a process with a predictable end time.
Can there be notifications when updates are available? There are scripts out there (like this one which I have never used) which can poll git repositories and run notify-send
, but that's not very useful. Instead, it's worth knowing that most of the cost of auto-upgrade is running the nixos-rebuild
command at all, even if there are no available upgrades!
Instead, consider setting system.autoUpgrade.dates
to a fixed time when you definitely won't use the computer, and also set system.autoUpgrade.persistent
. This will run auto-upgrade on boot in the worst case.
Also, USB devices should not be disconnecting on every update. If USB disconnections happen under high load, check dmesg
for possible hints; you may merely need to add an override to boot.kernelParams
.