nixos/tailscale: make resolvconf package depending on enablement of module

If resolvconf is not enabled, trying to use it always fails because
/etc/resolvconf.conf contains an `exit 1`.
This commit is contained in:
Sandro Jäckel
2024-01-25 15:50:36 +01:00
parent 5e05ea57fb
commit 922351ec86
@@ -74,11 +74,10 @@ in {
systemd.services.tailscaled = {
wantedBy = [ "multi-user.target" ];
path = [
config.networking.resolvconf.package # for configuring DNS in some configs
pkgs.procps # for collecting running services (opt-in feature)
pkgs.getent # for `getent` to look up user shells
pkgs.kmod # required to pass tailscale's v6nat check
];
] ++ lib.optional config.networking.resolvconf.enable config.networking.resolvconf.package;
serviceConfig.Environment = [
"PORT=${toString cfg.port}"
''"FLAGS=--tun ${lib.escapeShellArg cfg.interfaceName}"''