krebs / krops

Mirror of https://cgit.krebsco.de/krops/about/ (PRs / issues accepted, as can be seen by not having them disabled)
Do What The F*ck You Want To Public License
132 stars 18 forks source link

Use "system.autoUpgrade" with krops #23

Open jgeerds opened 3 years ago

jgeerds commented 3 years ago

This is not a real issue and maybe I'm just missing something… but what is the best way to achieve automatic system updates (like system.autoUpgrade) with krops?

Currently, I've pinned nixpkgs using niv and manually deploy (e.g. update) my machines. This has the obviously advantage of deterministic deployments because I'm not just tracking a channel like nixos-20.09 but, instead, a specific point/hash of this channel. The downside is that system.autoUpgrade does not match this workflow.

How do you guys achieve automatic system updates? Updating nixkgs sources and deploying using a CI/CD system? Is this something where Flakes could help out?

Lassulus commented 3 years ago

I have one system I run with auto upgrades, the way I do it, is to not deploy nixpkgs with krops but have it as a channel. then system.autoUpgrade works as expected. I guess flakes could also do that. Also I have a repo where nixpkgs.json is created by a script with the current rev and then commited into the repo and pushed onto CI.