routerUpdate.repository (a module option beside the update keys, not a router.* setting) defaults to the project's repository; the Updates page names it but no longer has a field for it. Forks and tests set it in a module. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
23 lines
988 B
Nix
23 lines
988 B
Nix
# The flake.nix of an installed router's configuration directory when its
|
|
# nixos-router comes from a git repository (routerUpdate.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 [ ];
|
|
};
|
|
};
|
|
}
|