DGNum's fork of Liminix, tailored for our infrastructure.
Find a file
Raito Bezarius 1bd9af1e9d fix(bridge): reorder initialization for bridge dependents
Consider the scenario where you run DHCPv4 on the primary bridge
interface.

You have no real interface to "wait upon", so it's OK. Nonetheless,
anything depending on successful completion of DHCPv4, e.g. adding a
default route, will block `s6-rc -v2 up change default`.

The way new interfaces are attached to the bridge is via `s6-rc -b -u
change $attach-oneshot-service`, this introduce in turn a deadlock.

At some point, DHCPv4 will timeout, unblocking the deadlock and
attaching the members to the primary bridge interface, making it ready
to send L2 broadcast packets for DHCP, unblocking DHCP in turn again.

This is not satisfying because we really want to have a no-hiccups
bring-up.

To fix this, we proceed to multiple changes:

- we remove `svc.ifwait.build` out of band `s6-rc -b -u $oneshot-attach`
  call, which is, by design, wrong here.
- users can now depend on the members service to know when a bridge is
  fully operational (we could make it more granular and let them depend
  on the LAN member joining rather than WLAN, etc.)
- users can also depend on the primary service being brought up rather
  than just being present, this is useful if you need to bring it up
  when it has AT LEAST one member to get link local address or MAC
  addresses (fixing DHCPv6 bring up as well because `ff02::1` is used
  there).

One thing is not addressed yet, if you are running a WLAN service using
RADIUS attached to the bridge, at bring up time, it will try to reach
out the external RADIUS server and *fail*.

To solve this, granular dependency on the DHCPv4 once LAN is joined.
Then the hostapd can wait on defaultroute4 completion so that
connectivity is available to reach RADIUS server.

It can join the bridge later on without any hiccup as well.

This is left as a TODO as hostapd can survive RADIUS authentication
failure and retry later.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-01 18:15:28 +02:00
.forgejo/workflows feat(ci): build VM QEMU MIPS 2024-08-27 11:05:43 +02:00
devices fix(zyxel/nwa50ax): ensure the DTB is in the FIT 2024-09-01 17:48:54 +02:00
doc docs: add hardware recommendation 2024-01-04 14:35:00 +01:00
examples examples/hello-from-qemu: add platforms 2024-08-25 18:44:23 +02:00
lib fix(assertions): wire up the assertion system 2024-05-24 19:00:04 +02:00
modules fix(bridge): reorder initialization for bridge dependents 2024-09-01 18:15:28 +02:00
pkgs fix(bridge): pick up MAC from another interface 2024-09-01 17:48:54 +02:00
tests inout: test hotplug and coldplug 2024-04-27 22:41:30 +01:00
.gitignore chore(git): ignore ccls LSP cache for C source code in the tree 2024-05-13 01:46:20 +02:00
bordervm-configuration.nix bordervm enable nat 2024-05-24 17:23:27 +02:00
bordervm.conf-example.nix support USB ethernet in bordervm 2023-05-09 22:58:56 +01:00
ci.nix ci.nix: alphabetise systems 2024-02-21 19:49:14 +00:00
CODE-OF-CONDUCT.md link to CoC, mention IRC 2023-02-22 18:14:40 +00:00
CONTRIBUTING.md fix spelling, remove dead file 2023-02-05 22:42:41 +00:00
default.nix fix(default): add overlay via nixos module system 2024-08-23 19:36:34 +02:00
LICENSE licence: remove accidental punctuation, update copyright year 2023-01-29 16:39:50 +00:00
nat.nft example config for ppoe router 2023-02-25 23:12:55 +00:00
NEWS pass entire config fragment to levitate, not just services 2024-04-29 20:07:01 +01:00
overlay.nix feat(mtd-utils): save more space 2024-09-01 17:48:54 +02:00
README.md docs: add hardware recommendation 2024-01-04 14:35:00 +01:00
shell.nix set FENNEL_PATH using absolute paths 2023-09-08 21:01:39 +01:00
STYLE.md explain package/module distinction, add notes on side tracks 2022-09-27 14:11:23 +01:00
THOUGHTS.txt think (foreshadowing) 2024-05-24 17:23:27 +02:00
vanilla-configuration.nix fix vanilla-configuration defaultroute 2024-03-28 22:13:21 +00:00

Liminix

A Nix-based system for configuring consumer wifi routers or IoT device devices, of the kind that OpenWrt or DD-WRT or Gargoyle or Tomato run on. It's a reboot/restart/rewrite of NixWRT.

This is not NixOS-on-your-router: it's aimed at devices that are underpowered for the full NixOS experience. It uses busybox tools, musl instead of GNU libc, and s6-rc instead of systemd.

The Liminix name comes from Liminis, in Latin the genitive declension of "limen", or "of the threshold". Your router stands at the threshold of your (online) home and everything you send to/receive from the outside word goes across it.

Current status (does it work yet?)

Liminix is pre-1.0. We are still finding new and better ways to do things, and there is no attempt to maintain backward compatibility with the old ways.

The NEWS file (available wherever you found this README) is a high-level overview of breaking changes.

Development mostly happens on the main branch, which is therefore not guaranteed to build or to work on every commit. For the latest functioning version, see the CI system and pick a revision with all jobs green.

Documentation

Documentation is in the doc directory. You can build it by running

nix-shell -p sphinx --run "make -C doc hardware.rst html"

Rendered documentation corresponding to the latest commit on main is published to https://www.liminix.org/doc/

Extremely online

There is a #liminix IRC channel on the OFTC network in which you are welcome. You can also connect with a Matrix client by joining the room #_oftc_#liminix:matrix.org.

In the IRC channel, as in all Liminix project venues, please conduct yourself according to the Liminix Code of Conduct.