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>
23 lines
989 B
Nix
23 lines
989 B
Nix
# The flake.nix of an installed router's configuration directory when its
|
|
# nixos-router comes from a git repository (router.update.repository).
|
|
# `router-update --git` writes it with @SOURCE@ replaced by the address of the
|
|
# release it installs (git+URL?ref=refs/tags/vX.Y.Z&rev=COMMIT), so the lock
|
|
# file and this file always agree and nothing moves to a newer commit by itself.
|
|
#
|
|
# The release (version, commit time, settings schema) is the flake's own: an
|
|
# input from git has its commit, unlike the `path:` input of a bundle's flake.
|
|
#
|
|
# This is a contract between the updater that is installed and the release it
|
|
# installs: change it only in a way every earlier updater can still write.
|
|
{
|
|
inputs.nixos-router.url = "@SOURCE@";
|
|
outputs =
|
|
{ nixos-router, ... }:
|
|
{
|
|
nixosConfigurations.router = nixos-router.lib.mkRouterSystem {
|
|
settings = ./settings.json;
|
|
modules = if builtins.pathExists ./local.nix then [ ./local.nix ] else [ ];
|
|
};
|
|
};
|
|
}
|