nixpkgs/nixos/modules
Martin Weinelt d1d8dd3e55
nixos/knot: add support for XDP setups
The Express Data Path (XDP) is a way to circumvent the traditional Linux
networking stack and instead run an eBPF program on your NIC, that makes
the decision to provide Knot with certain packets. This is way faster
and more scalable but comes at the cost of reduced introspection.

Unfortunately the `knotc conf-check` command fails hard with missing
interfaces or IP addresses configured in `xdp.listen`, so we disable it
for now, once the `xdp` config section is set. We also promote the config
check condition to a proper option, so our conditions become public
documentation, and we allow users to deal with corner cases, that we have
not thought of yet.

We follow the pre-requisites documented in the Knot 3.3 manual, and set
up the required capabilities and allow the AF_XDP address family.

But on top of that, due to our strict hardening, we found two more
requirements, that were communicated upstream while debugging this.

- There is a requirement on AF_NETLINK, likely to query for and configure
  the relevant network interface
- Running eBPF programs requires access to the `bpf` syscall, which we
  deny through the `~@privileged` configuration.

In summary We now conditionally loosen the hardening of the unit once we
detect that an XDP configuration is wanted. And since we cannot
introspect arbitrary files from the `settingsFiles` option, we expose XDP
support through the `enableXDP` toggle option on the module.
2024-02-13 13:44:31 +01:00
..
config fastfetch: add vulkanSupport option 2024-02-05 01:32:05 +03:00
hardware nixos/corectrl: add package option 2024-01-23 15:35:44 -05:00
i18n/input-method nixos/fcitx5: allow using the wayland frontend instead of the fcitx5 one 2024-01-04 15:06:58 -05:00
image nixos/repart: add option for configuring sector size 2024-01-27 17:19:32 -08:00
installer Merge pull request #279174 from SuperSandro2000/iso-minimal-override 2024-01-14 15:26:29 -05:00
misc Merge pull request #282971 from wegank/restya-board-drop 2024-02-10 17:28:05 +01:00
profiles nixos/hardened: update hardened profile to new recommendations 2024-01-27 20:43:58 +00:00
programs nixos/chromium: remove lots of extra whitespace from docs 2024-02-07 16:04:26 +01:00
security pam_usb, nixos/pam-usb: drop 2024-02-08 02:59:45 +01:00
services nixos/knot: add support for XDP setups 2024-02-13 13:44:31 +01:00
system Merge pull request #285114 from WilliButz/improve-uki-settings-merging 2024-02-08 21:15:08 +01:00
tasks nixos/filesystems: init overlayfs 2024-02-07 22:13:00 +01:00
testing nixos/test-instrumentation: use file to set root password 2024-01-18 23:08:13 +01:00
virtualisation Merge pull request #287445 from fricklerhandwerk/qemu-env-vars 2024-02-10 22:12:06 -05:00
module-list.nix Merge pull request #284814 from yaxitech/github-runner-module-update 2024-02-11 06:10:56 -08:00
rename.nix restya-board: drop 2024-02-07 01:33:05 +01:00