Update from a git repository
router.update.repository names a public repository whose tags vX.Y.Z are releases. router-update check (daily, and from the Updates page) looks for a newer one and the Overview says so; router-update --git builds the router from a tag like a bundle update: the settings are migrated, the new version must be confirmed, the nixpkgs pin stays. The flake of such a router comes from the release's config-flake.nix. The global flake registry is off. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
{{with .Data.NewRouter}}
|
||||
<section class="notice"><p>nixos-router {{.}} is out. <a href="/update">Look at it on the Updates page</a>.</p></section>
|
||||
{{end}}
|
||||
{{with .Data.NewRelease}}
|
||||
<section class="notice"><p>NixOS {{.}} is out. <a href="/update#packages">See what it would change</a>.</p></section>
|
||||
{{end}}
|
||||
|
||||
@@ -38,6 +38,41 @@
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Releases from git</h2>
|
||||
<p>The router looks once a day at the release tags (<code>vX.Y.Z</code>) of a public repository and says here and on the
|
||||
Overview when a newer one exists. Installing builds it on the router, like a bundle: the settings are kept (and
|
||||
migrated), and the new version must be confirmed afterwards, or the router goes back. The repository is trusted
|
||||
as it is: nothing is signed on this path.</p>
|
||||
<form method="post" action="/update/repository" class="actions">
|
||||
<input type="hidden" name="csrf" value="{{.CSRF}}">
|
||||
<label>Repository <input name="repository" value="{{$u.Repository}}" size="44" placeholder="https://git.example.org/me/nixos-router"></label>
|
||||
<button class="secondary">Save</button>
|
||||
</form>
|
||||
{{if $u.Repository}}
|
||||
<form method="post" action="/update/gitcheck" class="actions">
|
||||
<input type="hidden" name="csrf" value="{{.CSRF}}">
|
||||
<button class="secondary"{{if $u.GitRun.Running}} disabled{{end}}>{{if $u.GitRun.Running}}Looking…{{else}}Look for a newer release{{end}}</button>
|
||||
</form>
|
||||
{{if and $u.GitRun.Result (ne $u.GitRun.Result "success")}}<p class="error">The last look failed:</p><pre class="log">{{$u.GitRun.Log}}</pre>{{end}}
|
||||
{{with $u.Git}}
|
||||
<dl>
|
||||
<dt>Installed</dt><dd>{{.Installed}}</dd>
|
||||
<dt>Newest</dt><dd>{{.Newest.Version}} <span class="muted">{{printf "%.7s" .Newest.Rev}}, looked {{.Time}}</span></dd>
|
||||
</dl>
|
||||
<form method="post" action="/update/gitinstall">
|
||||
<input type="hidden" name="csrf" value="{{$.CSRF}}">
|
||||
<input type="hidden" name="tag" value="{{.Newest.Tag}}">
|
||||
{{if .Newer}}<p>A newer release is available.</p>
|
||||
{{else}}<p>Up to date.</p><p><label><input type="checkbox" name="force"> install it anyway</label></p>{{end}}
|
||||
<button{{if $u.Pending}} disabled{{end}}>{{if .Newer}}Install {{.Newest.Version}}{{else}}Install {{.Newest.Version}} again{{end}}</button>
|
||||
</form>
|
||||
{{else}}
|
||||
<p class="hint">Not looked yet.</p>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Install a bundle</h2>
|
||||
<p>A <code>.bundle</code> file made with <code>nix run .#release</code>. It is installed only if it is signed with
|
||||
|
||||
Reference in New Issue
Block a user