nixpkgs/nixos
Luflosi 3c63da7cf8
nixos/tor: allow tor to read resolv.conf when using resolved
When `services.resolved.enable` is set to true, the file /etc/resolv.conf becomes a symlink to /etc/static/resolv.conf, which is a symlink to /run/systemd/resolve/stub-resolv.conf. Without this commit, tor does not have access to this file thanks to systemd confinement. This results in the following warning when tor starts:
```
[warn] Unable to stat resolver configuration in '/etc/resolv.conf': No such file or directory
[warn] Could not read your DNS config from '/etc/resolv.conf' - please investigate your DNS configuration. This is possibly a problem. Meanwhile, falling back to local DNS at 127.0.0.1.
```
To fix this, simply allow read-only access to the file when resolved is in use.
According to https://github.com/NixOS/nixpkgs/pull/161818#discussion_r824820462, the symlink may also point to /run/systemd/resolve/resolv.conf, so allow that as well.
2022-03-15 15:16:14 +01:00
..
doc Merge pull request #164050 from LunNova/lunnova/disable-lucida-bitmap-fonts 2022-03-15 09:42:07 +01:00
lib Merge pull request #154113 from pennae/systemd-escaping 2022-03-13 19:57:32 +00:00
maintainers nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
modules nixos/tor: allow tor to read resolv.conf when using resolved 2022-03-15 15:16:14 +01:00
tests Merge pull request #163433 from JJJollyjim/bcachefs 2022-03-14 15:34:43 +01:00
COPYING
default.nix nixos: Make system.build.vm a standard attribute based on vmVariant 2021-12-17 14:49:31 +01:00
README
release-combined.nix nixos/release tested job: drop nano test 2022-03-01 19:28:31 +01:00
release-small.nix nixos/release: disable nfs3.simple 2022-03-03 06:34:59 +10:00
release.nix lxdImage: split from docker profile, use generators.toYAML 2021-11-03 07:49:54 +01:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
https://nixos.org/nixos and in the manual in doc/manual.