# 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 [ ]; }; }; }