Commit Graph

54 Commits

Author SHA1 Message Date
Eelco Dolstra
09cbfea2ed
Revert "resolvconf.conf: Remove forced NSCD service restart"
This reverts commit d8c16bc54a. It
breaks nscd invalidation when the network configuration changes.
2018-11-21 15:26:37 +01:00
Florian Jacob
e80cdb2bac nixos/systemd-resolved: link resolv.conf to dynamic stub resolver
version as recommended by upstream (since systemd 236):
https://www.freedesktop.org/software/systemd/man/systemd-resolved.html#/etc/resolv.conf
2018-11-13 19:21:02 +01:00
Travis Athougies
8cc028fd34 nixos/networking.nix: only setup rpc on glibc
(cherry picked from commit 4177dc3f77)
and
(cherry picked from commit a2f0c95baf)
2018-10-30 20:29:28 -05:00
Jan Malakhovski
c57892462b nixos/networking: add hostname to /etc/hosts by default
We use `127.0.1.1` instead of `127.0.0.1` because some applications will fail if
`127.0.0.1` resolves to something other than `localhost`.

Debian does the same.

See #1248 and #36261.
2018-10-02 23:58:36 +00:00
Jan Malakhovski
1ece5041a4 nixos/networking: simplify /etc/hosts generation, add asserts
Since `networking.hosts` is properly typed all of that magic `/etc/hosts` generator
does can be dropped. People that disagree with the value of `networking.hosts` can
simply `mkForce`.
2018-10-02 23:58:35 +00:00
Alexander Shpilkin
81fa1ceeee nixos/networking: include local Unbound in resolv.conf
Previously, only BIND, dnsmasq and resolved were included in
resolv.conf. Recognize an Unbound installation as well.
2018-07-23 16:26:03 +02:00
Michael Raitza
d8c16bc54a resolvconf.conf: Remove forced NSCD service restart
Forcibly restarting NSCD is unnecessary and breaks setups that use SSSD for
authentication. NSCD is capable of detecting changes to /etc/resolv.conf and
invalidating its caches internally. Restarting NSCD/SSSD breaks user name and
UID resolution.
2018-06-25 16:25:15 +02:00
Orivej Desh
d5facd5df3 nixos/networking: support static resolv.conf 2017-12-04 13:58:54 +00:00
Peter Hoeg
6fd4209594 Revert "networking: add option to toggle the wait-online service"
This reverts commit 8758f476b3.
2017-10-14 14:42:49 +08:00
Peter Hoeg
8758f476b3 networking: add option to toggle the wait-online service 2017-10-14 14:38:04 +08:00
Peter Simons
99f759de1c Revert "nixos: add option for bind to not resolve local queries (#29503)"
This reverts commit 670b4e29ad. The change
added in this commit was controversial when it was originally suggested
in https://github.com/NixOS/nixpkgs/pull/29205. Then that PR was closed
and a new one opened, https://github.com/NixOS/nixpkgs/pull/29503,
effectively circumventing the review process. I don't agree with this
modification. Adding an option 'resolveLocalQueries' to tell the locally
running name server that it should resolve local DNS queries feels
outright nuts. I agree that the current state is unsatisfactory and that
it should be improved, but this is not the right way.

(cherry picked from commit 23a021d12e)
2017-09-23 16:41:34 +02:00
gwitmond
bd52618c9d
nixos: add option for bind to not resolve local queries (#29503)
When the user specifies the networking.nameservers setting in the
configuration file, it must take precedence over automatically
derived settings.

The culprit was services.bind that made the resolver set to
127.0.0.1 and ignore the nameserver setting.

This patch adds a flag to services.bind to override the nameserver
to localhost. It defaults to true. Setting this to false prevents the
service.bind and dnsmasq.resolveLocalQueries settings from
overriding the users' settings.

Also, when the user specifies a domain to search, it must be set in
the resolver configuration, even if the user does not specify any
nameservers.

(cherry picked from commit 670b4e29ad)

This commit was accidentally merged to 17.09 but was intended for
master. This is the cherry-pick to master.
2017-09-18 22:54:29 +02:00
Valentin Shirokov
d30b2eb1c0 Removed networking.fqdn option
Adding it was a mistake which can only lead to problems and confusion.
2017-07-31 13:55:41 +02:00
Valentin Shirokov
a74c0c6652 Removed deprecation warning for networking.extraHosts 2017-07-31 10:04:01 +02:00
Vladimír Čunát
8177561e8f
Merge #27105: more correct form of /etc/hosts 2017-07-30 09:57:41 +02:00
Valentin Shirokov
635ecd802f Deprecation warning for networking.extraHosts 2017-07-28 00:15:17 +03:00
florianjacob
9937f13308 resolved: use resolved's static resolv.conf (#27144)
because it is upstream's recommended mode of operation:
https://www.freedesktop.org/software/systemd/man/systemd-resolved.html#/etc/resolv.conf
2017-07-13 14:40:31 +01:00
Valentin Shirokov
d29fc731b3 Example of networking.hosts is now literalExample 2017-07-09 23:12:57 +03:00
Valentin Shirokov
163393865f Style optimizations 2017-07-09 08:56:36 +03:00
Valentin Shirokov
2f97993992 Documentation fixes 2017-07-09 00:28:05 +03:00
Valentin Shirokov
396db6493d Style adjustments
Also dangerous typo fix
2017-07-08 23:04:47 +03:00
Valentin Shirokov
ca54c3f1aa Typo fix 2017-07-08 22:30:02 +03:00
Valentin Shirokov
5f2826fbed Added networking.hosts and networking.fqdn options 2017-07-08 21:13:16 +03:00
Valentin Shirokov
f9ec52dedc Added networking.extraLocalHosts option
It adds its contents to '127.0.0.1' line of /etc/hosts
It makes possible to point multiple domains to localhost in correct way
2017-07-04 02:19:11 +03:00
Jörg Thalheim
859267f627
systemd-resolved: fix case when dnsmasq is used as local resolver
fixes #25706
2017-05-31 23:30:35 +01:00
Jörg Thalheim
36fca93290
rename iana_etc to iana-etc
fixes #23621
2017-03-28 22:35:15 +02:00
Robin Gloster
274994785d
networking module: remove reference to removed ip-up.target 2017-02-23 15:25:19 +01:00
Franz Pletz
ab90eac835
networking: fix typo in resolvconf option edns0 2017-01-21 20:41:11 +01:00
Vladimír Čunát
11696e290d
nixos networking.dnsExtensionMechanism = true; by default
https://github.com/NixOS/nixpkgs/issues/12470#issuecomment-266785641
I've been using it for weeks without encountering any problems.
2017-01-10 15:15:01 +01:00
Jörg Thalheim
1590461887 ntp: make timesyncd the new default
- most nixos user only require time synchronisation,
  while ntpd implements a battery-included ntp server (1,215 LOCs of C-Code vs 64,302)
- timesyncd support ntp server per interface (if configured through dhcp for instance)
- timesyncd is already included in the systemd package, switching to it would
  save a little disk space (1,5M)
2016-12-17 00:00:45 +01:00
Jörg Thalheim
4792af66c3
networking: enable "multi on" in resolver settings
this allows to return ipv4/ipv6 addresses for the same host in /etc/hosts.
fixes #19148
2016-10-03 14:37:29 +02:00
aszlig
cb2f84e4d7
nixos/activation: Rename "tmpfs" to "specialfs"
Using "tmpfs" as a script part for system.activationScripts is a bit
misleading since 6efcfe03ae.

We no longer solely mount tmpfs within this script, so using "specialfs"
fits more nicely in terms of naming.

Tested against the "simple" NixOS installer test.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-09-26 02:04:54 +02:00
Alexander Ried
27bc34f1e4 treewide: deprecate ip-up.target (#18319)
Systemd upstream provides targets for networking. This also includes a target network-online.target.

In this PR I remove / replace most occurrences since some of them were even wrong and could delay startup.
2016-09-10 18:03:59 +02:00
Joachim Fasting
4e74479807
networking config: specify resolv.conf options as list of strings 2016-05-28 14:28:13 +02:00
Christian Zagrodnick
14dfdeb31a
networking config: support setting resolv.conf options
Closes: #11372
2016-05-28 14:28:13 +02:00
Vladimír Čunát
ae74c356d9 Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
2016-02-03 16:57:19 +01:00
Tobias Geerinckx-Rice
df29b0d23f nixos: fix evaluation
After commit 5e468b9, evaluation failed with:

  error: undefined variable ‘dnsExtensionMechanism’ at
  .../nixpkgs/nixos/modules/config/networking.nix:177:33
2016-01-20 01:19:03 +01:00
Peter Simons
5e468b96b4 nixos: add 'networking.dnsExtensionMechanism' option to enable edns0 (for DNSSEC)
Set this option to 'true' (default: 'false') to enable extension mechanisms for
DNS (EDNS) in your local glibc resolver. This is required for supporting
DNSSEC, for example.

Implementation detail: the patch changes assignments to "resolv_conf_options"
to use "+=" instead of "=" to ensure that multiple users of that variable don't
overwrite each other. The generated config file is a shell script, after all,
so this should work fine.

Closes https://github.com/NixOS/nixpkgs/issues/12470.
2016-01-19 21:54:43 +01:00
Luca Bruno
5b0352a6a4 Merge branch 'master' into closure-size 2015-12-11 18:31:00 +01:00
Sergey Mironov
565707c57a set all_proxy environment variable 2015-12-11 11:20:00 +03:00
Tuomas Tynkkynen
8088ad396c nixos/networking: Reference correct glibc output 2015-10-03 14:08:53 +02:00
Thomas Strobel
6da2ea345c networking module: add extraResolvconfConf option 2015-09-26 18:49:16 +02:00
Eelco Dolstra
8bb494c170 Get rid of a warning about dbus in the activation script 2014-12-12 10:45:37 +01:00
Antoine R. Dumont
da47d6bd59 Improve readability - from https://github.com/NixOS/nixpkgs/pull/5058#discussion_r21043552 2014-11-30 15:19:30 +01:00
Antoine R. Dumont
3c7e779602 Introduce a dedicated networking.proxy option
Following the discussion NixOS#5021:
- obsolete the nix.proxy option
- add the networking.proxy option
- open a default no_proxy environment variable
- add a rsync option
- Manual tests ok.
- Automatic tests ok.

Amended by lethalman to simplify the option descriptions.
2014-11-30 15:19:25 +01:00
William A. Kennington III
1860ee27b0 nixos/networking: Fixes 2014-11-26 16:29:24 -08:00
William A. Kennington III
c234e7b115 nixos/networking: Rebuild resolvconf during activation
This is needed when /etc/resolv.conf is being overriden by networkd
and other configurations. If the file is destroyed by an environment
activation then it must be rebuilt so that applications which interface
with /etc/resolv.conf directly don't break.
2014-11-26 11:22:02 -08:00
William A. Kennington III
8cffa37787 networkd: Support Host Resolvconf 2014-11-26 11:22:02 -08:00
William A. Kennington III
a332c4eac5 systemd: Enable more network services 2014-11-26 11:22:02 -08:00
Paul Colomiets
adbb9ff796 dnsmasq: upgrade to 2.71, fixed dnsmasq module
* The module now has systemd config

* Add resolveLocalQueries option which sets up it as a dns server for
  local host (including reasonable setup of resolvconf)

* Add "dnsmasq" user for running daemon

* Enabled dbus and dnssec support for the package

Conflicts:
	nixos/modules/misc/ids.nix
2014-08-28 11:39:03 -07:00