Add a generic installer that asks for the basics and builds offline
The installer ISO no longer needs a prebuilt system: `router-setup` asks for the disk, the WAN and LAN interfaces, DHCP or PPPoE (optionally on a VLAN), host name, LAN address and a password, writes settings.json and the secrets, builds that router offline (the ISO carries a reference router system whose closure has everything the build needs) and installs it with `router-install --system`. The password is used for the web UI and, hashed, as root's console password (routerSettings sets root's hashedPasswordFile; it applies when the account is created at installation). checks.setup answers router-setup on the console and checks the installed box: its settings, the web UI and console login with that password, and a rebuild that reproduces the installed system. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
@@ -21,11 +21,20 @@
|
||||
settings.PermitRootLogin = "prohibit-password";
|
||||
};
|
||||
|
||||
users.motd = ''
|
||||
users.motd =
|
||||
if config.router.installer.system != null then
|
||||
''
|
||||
|
||||
nixos-router installer
|
||||
1. (optional) scp -r secrets root@<this-host>:secrets
|
||||
2. router-install --secrets /root/secrets /dev/<disk>
|
||||
The disk is erased after confirmation.
|
||||
'';
|
||||
nixos-router installer
|
||||
1. (optional) scp -r secrets root@<this-host>:secrets
|
||||
2. router-install --secrets /root/secrets /dev/<disk>
|
||||
The disk is erased after confirmation.
|
||||
''
|
||||
else
|
||||
''
|
||||
|
||||
nixos-router installer
|
||||
Run `sudo router-setup`: it asks a few questions, erases the chosen disk
|
||||
and installs the router. Everything else is set up in the web UI.
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user