nixosModules.settings builds a router from a JSON file: the router options as they are, plus host name, time zone, SSH keys and stateVersion; the module system validates it. lib.mkRouterSystem builds such a system, lib.mkConfigDir the configuration directory installed to /var/lib/router/config (a flake pinned to this router source, the settings and an optional local.nix). router-apply builds it and switches with commit-confirm. The device must be able to rebuild without internet, so the packages the rebuilt derivations need are part of the system; they were found by diffing the derivation graphs of typical changes against the installed system. checks.apply installs such a router, boots it offline, checks that the unchanged settings rebuild to the installed system, applies and confirms a change, and rolls back an unconfirmed one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
707 B
Nix
19 lines
707 B
Nix
{ self, pkgs }:
|
|
{
|
|
basic = import ./basic.nix { inherit self pkgs; };
|
|
pppoe = import ./basic.nix {
|
|
inherit self pkgs;
|
|
wan4 = "pppoe";
|
|
};
|
|
vlans = import ./vlans.nix { inherit self pkgs; };
|
|
onestick = import ./onestick.nix { inherit self pkgs; };
|
|
rollback = import ./rollback.nix { inherit self pkgs; };
|
|
dns = import ./dns.nix { inherit self pkgs; };
|
|
installer = import ./installer.nix { inherit self pkgs; };
|
|
apply = import ./apply.nix { inherit self pkgs; };
|
|
image = import ./image.nix { inherit self pkgs; };
|
|
wireguard = import ./wireguard.nix { inherit self pkgs; };
|
|
lib = import ./lib.nix { inherit pkgs; };
|
|
assertions = import ./assertions.nix { inherit self pkgs; };
|
|
}
|