Commit graph

203 commits

Author SHA1 Message Date
Ryan Lahfa bc7c15825b
Merge pull request #117371 from grahamc/sysctl-hostname
network-interfaces: set hostname from sysctl if defined
2022-12-01 16:03:04 +01:00
Robert Hensing 93a905ec4f
Merge pull request #194759 from hercules-ci/fqdn-or-hostname
nixos: Add `networking.fqdnOrHostName`
2022-11-09 13:53:57 +01:00
Naïm Favier 8f571534c9
Merge pull request #194766 from ncfavier/proxy-arp 2022-10-31 09:59:56 +01:00
Robert Hensing 18e3f431e1 networking.fqdnOrHostName: Elaborate and format the descriptions 2022-10-15 11:57:58 +02:00
Naïm Favier 52c58c8bbe
nixos/network-interfaces: reflect negative settings of proxyARP
Currently, setting `proxyARP` to true enables `proxy_arp`, but setting
it to false doesn't disable it. This is surprising and stateful.
2022-10-06 16:46:17 +02:00
Robert Hensing f43716f28e nixos: Add networking.fqdnOrHostName option, readOnly 2022-10-06 16:21:09 +02:00
digital 12d64e041b nixos/networking: add a suggestion to use networkd options 2022-09-15 18:07:24 +02:00
pennae 9217509ece nixos/network-interfaces: convert option descriptions to MD 2022-08-27 19:18:29 +02:00
pennae 7e7d68a250 nixos/*: mark pre-existing markdown descriptions as mdDoc 2022-08-19 22:40:58 +02:00
pennae 087472b1e5 nixos/*: automatically convert option docs 2022-08-06 20:39:12 +02:00
pennae 423545fe48 nixos/*: normalize manpage references to single-line form
now nix-doc-munge will not introduce whitespace changes when it replaces
manpage references with the MD equivalent.

no change to the manpage, changes to the HTML manual are whitespace only.
2022-08-05 18:34:50 +02:00
pennae 3aebb4a2be nixos/*: normalize link format
make (almost) all links appear on only a single line, with no
unnecessary whitespace, using double quotes for attributes. this lets us
automatically convert them to markdown easily.

the few remaining links are extremely long link in a gnome module, we'll
come back to those at a later date.
2022-08-03 21:57:46 +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
Alexandru Scvortov 3a09010b9d nixos/network-interfaces: add networking.interfaces.<name>.ipv[46].routes.type 2022-06-02 19:16:25 +01:00
Maximilian Bosch 196c877c85
nixos/network-interfaces: remove outdated deprecation information 2022-04-30 12:40:10 +02:00
Janne Heß 3396c96e4b
nixos/stage-1-init: Set host id for ZFS 2022-04-16 21:32:18 +01:00
Linus Heckemann 3631db714c
Merge pull request #158176 from lheckemann/fix-tempaddr
network-interfaces: use altered interface name for setting use_tempaddr
2022-03-29 10:39:46 +02:00
jpathy 19bb72c070 networking.greTunnels: Add ttl option 2022-03-23 00:24:44 +05:30
jpathy 0a62de4cd5 networking.greTunnels: support ip6gre* 2022-03-17 17:59:36 +05:30
Alyssa Ross 1176525f87 treewide: remove obsolete kernel version checks
We don't support Linux kernels older than 4.4 in Nixpkgs.
2022-02-19 21:09:19 +00:00
Linus Heckemann c74d784771 network-interfaces: use altered interface name for setting use_tempaddr
Fixes #86764
2022-02-05 00:13:03 +01:00
Jade fe636b4805
nixos/networking: Typo fix 2022-02-04 13:55:56 -05:00
Luflosi ca58bd0a50
nixos/networkd: Add routes from interfaces to [Route] section of .network file
Closes https://github.com/NixOS/nixpkgs/pull/93635.
2022-01-20 20:14:55 +01:00
Guillaume Girol fdc3784828
Merge pull request #148637 from hexagonal-sun/network/gre-tap-tun
nixos/network: add gre virtual interfaces
2022-01-01 17:04:29 +00:00
pennae ed673a69db treewide: add defaultText for options with simple cfg.* expression defaults
adds defaultText for options with defaults that use only literals, full config.*
paths, and the cfg shortcut binding.
2021-12-09 01:14:16 +01:00
Matthew Leach 5ce7061945 nixos/networking: add options for configuring a GRE tunnel
Add `networking.greTunnels` option that allows a GRE tunnel to be
configured in NixOS.
2021-12-07 15:44:00 +00:00
Artturi a0d4895e9d
Merge pull request #146709 from Artturin/underscorename 2021-11-21 03:12:31 +02:00
Artturin 2077956e78 nixos/network-interfaces: add a warning for underscores in hostname
until the issues in https://github.com/NixOS/nixpkgs/pull/138978
have been resolved
2021-11-21 01:39:39 +02:00
Artturin 31759dc4b7 nixos/networkmanager: remove redundant ipv6.ip6-privacy
this setting was added in 2016 in commit
bcdd81d9e1

the posibility to preferTempAddress was added to
nixos/network-interface in 2018 in commit
1fec496f38

preferTempAddress was renamed to tempAddress
in 2020 in commit 2485e6399e

therefore this setting is redundant since nm will use the sysctl option

nixos/network-interfaces: add default to sysctl so that the value for it
is set

networkmanager falls back to it
https://man.archlinux.org/man/NetworkManager.conf.5
2021-11-19 01:12:25 +02:00
pennae c1f5155471 nixos/networking: support FOU encapsulation for sits 2021-10-16 20:48:03 -04:00
pennae f29ea2d15d nixos/networking: add foo-over-udp endpoint support
allows configuration of foo-over-udp decapsulation endpoints. sadly networkd
seems to lack the features necessary to support local and peer address
configuration, so those are only supported when using scripted configuration.
2021-10-16 20:48:03 -04:00
Michele Guerini Rocco 46b2a2594a
Merge pull request #140779 from legendofmiracles/wol
nixos/wakeonlan: switch to systemd.link and to nixos/networking
2021-10-09 10:34:26 +02:00
legendofmiracles bb3ea37eee
nixos/networking: add the wakeonlan option 2021-10-07 14:15:17 -06:00
Naïm Favier 2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
Samuel Dionne-Riel 110165b784 Provide submodule to security.wrappers for older kernels
Fixes a regression from #126289
2021-09-29 16:10:27 -04:00
rnhmjoj fedd7cd690
nixos: explicitely set security.wrappers ownership
This is slightly more verbose and inconvenient, but it forces you
to think about what the wrapper ownership and permissions will be.
2021-09-13 13:48:13 +02:00
John Whitman 8d3527aa88 nixos/network-interfaces: Fix wlan interface mac 2021-09-01 21:46:26 -04:00
github-actions[bot] 1ae6d3d02f
Merge master into staging-next 2021-05-07 18:24:29 +00:00
Linus Heckemann 4c4ac4bb20 nixos/network: allow configuring tempaddr for undeclared interfaces 2021-04-27 16:43:30 +02:00
Julien Moutinho 05d334cfe2 Revert "Revert "apparmor: fix and improve the service""
This reverts commit 420f89ceb2.
2021-04-23 07:17:55 +02:00
ajs124 c6d4dae35d treewide: fix eval without aliases after 9378fdf87e 2021-04-08 13:33:09 +02:00
Sandro Jäckel 9378fdf87e
iproute: deprecate alias 2021-04-04 01:43:46 +02:00
Graham Christensen 857c649083
network-interfaces: set hostname from sysctl if defined
The `networking.hostname` option was changed to not permit periods
in names, due to a strict reading of RFC 1123. For users who need
the hostname to be fully qualified, the networking.hostName option
suggests using boot.kernel.sysctl."kernel.hostname" as a workaround.

This option works correctly at boot time, but every "nixos-rebuild
switch" will change the hostname back to the unqualified version.

This commit brings the activation script in line with the
documentation's recommendation.
2021-03-23 11:40:54 -04:00
Florian Klink b2f3bd4d79
Merge pull request #100155 from primeos/nixos-add-fqdn-option
nixos/networking: Add a read-only option for the FQDN
2021-01-25 16:45:45 +01:00
Julien Moutinho 2263fa5698 nixos/network-interfaces: fix typo in udev rule syntax 2020-11-24 04:21:44 +01:00
Florian Klink 13be37662d kernel config: explicitly enable CONFIG_IPV6
We currently build CONFIG_IPV6=m.

This seems to be not really well-supported in mainline kernels - see
https://lore.kernel.org/netdev/20201115224509.2020651-1-flokli@flokli.de/T/#u

Compiling it as a module doesn't give too much benefit - even for people
who did explicitly set `enableIPv6` to false, the `ipv6` module was
still loaded, as soon as another module was loaded that requires it
(bridge,br_netfilter,wireguard,ip6table_mangle,sctp,…).

By compiling it in, we only loose the possibility to not add it to
`boot.kernelModules` anymore (as it's part of the kernel directly). The
space savings are negligible.

People wanting to disable IPv6 still get the appropriate sysctls and
options set (while having the kernel code loaded), nothing is really
changing here.
2020-11-16 13:07:49 +01:00
Michael Weiss 971f0b45ef
nixos/networking: Add a read-only option for the FQDN
This is a convenience option that can be used to quickly obtain the
configured FQDN.
2020-10-12 15:27:31 +02:00
Michael Weiss 4a600af1b1 doc: Document a workaround for using an FQDN as hostname
Since #76542 this workaround is required to use a FQDN as hostname. See
#94011 and #94022 for the related discussion. Due to some
potential/unresolved issues (legacy software, backward compatibility,
etc.) we're documenting this workaround [0].

[0]: https://github.com/NixOS/nixpkgs/issues/94011#issuecomment-705952300
2020-10-10 10:48:54 -07:00
Michael Weiss 826ed96c10
nixos/networking: Switch to home.arpa as an example for the domain
The special-use domain "home.arpa." is designated for non-unique use in
residential home networks [0] and registered as such [1]. Therefore it
is more appropriate than "home." which could cause conflicts or result
in queries that leak out and reach the root name servers.

[0]: https://tools.ietf.org/html/rfc8375
[1]: https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml
2020-10-10 17:41:42 +02:00
Vladimír Čunát 420f89ceb2
Revert "apparmor: fix and improve the service"
This reverts commit fb6d63f3fd.

I really hope this finally fixes #99236: evaluation on Hydra.
This time I really did check basically the same commit on Hydra:
https://hydra.nixos.org/eval/1618011

Right now I don't have energy to find what exactly is wrong in the
commit, and it doesn't seem important in comparison to nixos-unstable
channel being stuck on a commit over one week old.
2020-10-07 12:22:18 +02:00