this post was submitted on 17 Jan 2025
11 points (100.0% liked)
Nix / NixOS
1888 readers
1 users here now
Main links
Videos
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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 thenixos-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 setsystem.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 toboot.kernelParams
.Autoupdates during times when I'm not using the system might not work, as I usually shut down the PC when it's not in use... ๐ Looks like the best way to deal with the issue is to try and write an application myself of sorts?
Would love to have a diff before building a new version, but reading this blogpost it seems you can only get one afterwards https://blog.tjll.net/previewing-nixos-system-updates/
Anyways, if I were to make an app myself, although not very reliable, using the
[11/22/33] built,
logging during thenixos-rebuild
command could be a way to get some progressbar I think?