Commit Graph

16 Commits

Author SHA1 Message Date
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Aryeh Hillman
b6766564ed Update wg-quick.nix
Update wg-quick.nix such that a search for `WireGuard` in the `NixOS Options` section of search.nixos.org brings up the convenient `networking.wg-quick.interfaces.wg0.configFile` option.
2023-09-24 13:24:27 +02:00
Naïm Favier
dc1e00bd8b
nixos/wg-quick: use networking.firewall.package
Use `nftables` if available.
2022-12-26 10:28:03 +01:00
Milan Hauth
a1e9f1e036 nixos/firewall: move rpfilter from raw to mangle
fix wireguard (wg-quick)

netfilter packet flow:
raw.prerouting -> conntrack -> mangle.prerouting

rpfilter must be after conntrack
otherwise response packets are dropped
2022-10-05 09:50:56 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
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.
2022-07-30 15:16:34 +02:00
Naïm Favier
458ac47a1d
nixos/wg-quick: improve usage with systemd-networkd
Use `networking.resolvconf.package` to allow DNS entries to be set using
the system-wide resolver implementation instead of hardcoding systemd or
openresolv.

Extend the tests by adding DNS entries and making one of the peers use
systemd-networkd (hence systemd-resolved).

Also add a few `networkd`-specific settings.
2022-06-21 22:58:44 +02:00
Timothy DeHerrera
ec4e23d4e9
Merge pull request #171155 from cab404/wg-quick-files
nixos/wg-quick: added support for configuration files
2022-06-11 22:00:45 -07:00
cab
8de1e9e2f8
nixos/wg-quick: added support for configuration files 2022-06-07 01:28:50 +04:00
LuoChen
e4b942eccf wg-quick: fix postUp always generated issue 2022-05-05 16:08:46 +08:00
Sivizius
b4c2ffaffa
nixos/wg-quick: add autostart option to interfaces (#162219)
This adds the option `networking.wg-quick.interfaces.<name>.autostart`, which defaults to `true`, which is the previous behavior. With this option set to `false`, the systemd-unit will no longer be set to `wantedBy = [ "multi-user.target" ]` and therefore the tunnel has to be enabled/disabled via `systemctl start/stop wg-quick-<name>`.

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
2022-03-22 13:25:57 +00:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
ajs124
c6d4dae35d treewide: fix eval without aliases after 9378fdf87e 2021-04-08 13:33:09 +02:00
aszlig
4e92b613cc
nixos/wireguard: Fix mismatched XML tag
Build error introduced in fe7053f75a:

  parser error : Opening and ending tag mismatch: commmand line 6139 and command
  escription><para>Base64 preshared key generated by <commmand>wg genpsk</command>
                                                                                 ^
Writing "command" with only two "m" fixes building the NixOS manual.

Signed-off-by: aszlig <aszlig@nix.build>
2020-07-20 00:14:44 +02:00
Philipp Bartsch
fe7053f75a nixos/wireguard: fix typos and unify formatting 2020-07-19 14:57:39 +02:00
Bastian Köcher
644d643d68 nixos/wg-quick: Fix after wireguard got upstreamed 2020-04-03 12:39:35 +02:00
Reno Reckling
abf60791e2 nixos/modules/networking/wg-quick Add wg-quick options support
This is an implementation of wireguard support using wg-quick config
generation.

This seems preferrable to the existing wireguard support because
it handles many more routing and resolvconf edge cases than the
current wireguard support.

It also includes work-arounds to make key files work.

This has one quirk:
We need to set reverse path checking in the firewall to false because
it interferes with the way wg-quick sets up its routing.
2019-04-20 14:02:54 +02:00