about summary refs log tree commit diff
path: root/nixos/modules/services/networking/knot.nix
AgeCommit message (Collapse)AuthorFilesLines
2024-04-28nixos/knot: use a more precise type for .settingsVladimír Čunát1-1/+1
See discussion on PR #304373
2024-04-15nixos/knot: use module system to combine settings optionSandro Jäckel1-1/+1
2024-02-13nixos/knot: refactorMartin Weinelt1-10/+44
- Stop using `with lib` - Drop `lib.mdDoc` - Use `escaepSystemdExecArgs` for escaping
2024-02-13nixos/knot: add support for XDP setupsMartin Weinelt1-5/+52
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-01-24nixos/knot: allow specifying the `clear` sectionVladimír Čunát1-0/+1
It was added in 3.3.4. I'm not sure if it will be useful with NixOS services, but I added it in the usual way anyway.
2023-11-27treewide: use `mkPackageOption`h7x41-8/+1
This commit replaces a lot of usages of `mkOption` with the package type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-10-08nixos/knot: compatibility with 23.05 configVladimír Čunát1-6/+10
- run conf-check iff keyFiles == [] (like in 23.05; this was my bug) - support extraConfig + keyFiles - but warning will still be shown if extraConfig is used, and it might be slightly confusing
2023-09-23nixos/knot: add release notes and partial compatibilityVladimír Čunát1-0/+6
2023-09-23nixos/knot: also allow config by YAML fileVladimír Čunát1-1/+14
2023-09-23nixos/knot: allow full configuration by nix values (RFC 42)Vladimír Čunát1-6/+105
2022-12-17nixos: fix typosfigsoda1-1/+1
2022-09-26treewide: makeWrapper to nativeBuildInputsArtturin1-1/+1
this should be all of them other than the failed splices found with nixpkgs-lint
2022-08-31nixos/*: automatically convert option descriptionspennae1-1/+1
conversions were done using https://github.com/pennae/nix-doc-munge using (probably) rev f34e145 running nix-doc-munge nixos/**/*.nix nix-doc-munge --import nixos/**/*.nix the tool ensures that only changes that could affect the generated manual *but don't* are committed, other changes require manual review and are discarded.
2022-07-30treewide: automatically md-convert option descriptionspennae1-4/+4
the conversion procedure is simple: - find all things that look like options, ie calls to either `mkOption` or `lib.mkOption` that take an attrset. remember the attrset as the option - for all options, find a `description` attribute who's value is not a call to `mdDoc` or `lib.mdDoc` - textually convert the entire value of the attribute to MD with a few simple regexes (the set from mdize-module.sh) - if the change produced a change in the manual output, discard - if the change kept the manual unchanged, add some text to the description to make sure we've actually found an option. if the manual changes this time, keep the converted description this procedure converts 80% of nixos options to markdown. around 2000 options remain to be inspected, but most of those fail the "does not change the manual output check": currently the MD conversion process does not faithfully convert docbook tags like <code> and <package>, so any option using such tags will not be converted at all.
2021-12-04nixos/knot: update systemd hardeningMartin Weinelt1-7/+42
2021-10-04nixos/doc: clean up defaults and examplesNaïm Favier1-1/+1
2020-02-12knot: add keyFiles optionJörg Thalheim1-8/+23
This useful to include tsig keys using nixops without adding those world-readable to the nix store.
2020-02-12knot: drop dynamic userJörg Thalheim1-1/+8
This makes it hard to include secret files. Also using tools like keymgr becomes harder.
2020-01-23nixos/knot: set defaultText for package optionJörg Thalheim1-1/+1
the package attributes looks nicer in the manual
2019-03-14nixos/knot: initMartin Weinelt1-0/+95