{{define "content"}}
{{$d := .Data}}

Packages

Upgrades the kernel and all programs (NixOS) without a new release of nixos-router. Nothing is downloaded until you ask for it, and an upgrade is activated like a settings change: unless you confirm it in time, the router goes back to the previous system.

Running
{{or $d.Version "unknown"}}

The channel only chooses what an upgrade offers; saving it changes nothing on the router. NixOS cannot go back to an older release.

{{if $d.Updating}}

Updating…

The router is installing a new version of nixos-router.

{{else if $d.Run.Running}}

Working…

This page refreshes on its own. The web UI restarts when an upgrade is switched on.

{{else if $d.Pending}}

Waiting for confirmation

A new system is active and not confirmed yet. Confirm it on the Overview, or the router goes back to the previous one.

{{end}} {{if $d.Channel}}

Check

{{with $d.Check}}
Channel
{{.Branch}}
Running
{{.Running.Version}}
Newest
{{printf "%.7s" .Newest.Rev}} checked {{.Time}}
{{if .UpToDate}}

Up to date.

{{else}}

A newer revision is available.

{{end}} {{end}}

What would change

{{if and $d.Check $d.Check.UpToDate}}{{end}}

Works it out from the new revision's description: no package is downloaded.

{{with $d.Preview}}

{{.Version}} {{printf "%.7s" .Rev}}, previewed {{.Time}}

{{if .Changes}} {{range .Changes}}{{end}}
PackageNowNew
{{.Name}}{{.From}}→{{.To}}
{{else}}

No package changes.

{{end}}

The list shows the versions of programs the router runs; a program that is only rebuilt does not appear.

To download
{{or .Download "nothing, or the package cache cannot be reached"}}
Built here
{{.Builds}} derivation{{if ne .Builds 1}}s{{end}}{{if gt .Builds 50}} (many: the package cache may not have them yet; this takes long){{end}}
{{if .RebootNeeded}}
Kernel
A new kernel: it runs after the next reboot.
{{end}}
Upgrade to {{.Version}}

Downloading first lets you start the upgrade later without needing the internet. Upgrading downloads what is missing, builds the system and switches to it; confirm it on the Overview.

{{end}}
{{else}}

Choose a channel to look for upgrades.

{{end}} {{if $d.Run.Log}}

Last run{{if $d.Run.Result}} — {{if eq $d.Run.Result "success"}}succeeded{{else}}failed ({{$d.Run.Result}}){{end}}{{end}}

{{$d.Run.Log}}
{{end}}
{{end}}