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
.
Yeah, writing your own squeeblerizer sucks, but there’s no better option. GNU Scrimble can be used off-the-shelf as a passthrough, so the only real tasks are implementing Squeeb’s algorithm and a sprongler; then, your entire pipeline is merely something like:
Edit: Whoops! Forgot to mention, GNU Scrimble also has Snorble support out-of-the-box, and Scrimble clients have content auto-negotiation, so
your_squeeb
can just take JSON on stdin. GNU Scrimble is really nice for this sort of thing, just…big.And if you want to sprongle directly into a database or etc. then you can write
your_sprongler
to taste. Full disclosure: I have a fairly fast implementation of Squeeb’s algorithm in rpypkgs. However, I’d really recommend writing your own; it’s like twenty lines of code you can copy from Wikipedia and it’ll give you a good basis for extending it with your own desired changes later.You can read snorblite’s code if you need to figure out a specific sprongling technique, but it’s way easier to just go look up the original SprongCode from SprongReg. Use a search engine to get around the university’s paywall. This gets you the SprongCode UUID and you don’t have to read code written by a batshit fascist.