diff options
author | tv <tv@krebsco.de> | 2024-01-11 11:27:40 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2024-01-11 11:27:40 +0100 |
commit | 4faca35b72ef2ac8ba3c86d6a9fe386f6ed39a9f (patch) | |
tree | 616b8c335e4e06f57bf112bdf0ba35f75e305464 /krebs | |
parent | 829ed4de44ba4d3fb5d424873bafa449c0531c41 (diff) | |
parent | 9368e6d78abbe1523a2a54279fd4e9db01a4f610 (diff) |
Merge remote-tracking branch 'orange/master'
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/3modules/sync-containers3.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/krebs/3modules/sync-containers3.nix b/krebs/3modules/sync-containers3.nix index d3a65bd4c..7373592a5 100644 --- a/krebs/3modules/sync-containers3.nix +++ b/krebs/3modules/sync-containers3.nix @@ -58,6 +58,8 @@ in { pkgs.jq ]; networking.useDHCP = lib.mkForce true; + networking.useHostResolvConf = false; + services.resolved.enable = true; systemd.services.autoswitch = { environment = { NIX_REMOTE = "daemon"; @@ -297,9 +299,6 @@ in { (lib.mkIf (cfg.containers != {}) { # networking - # needed because otherwise we lose local dns - environment.etc."resolv.conf".source = lib.mkForce "/run/systemd/resolve/resolv.conf"; - boot.kernel.sysctl."net.ipv4.ip_forward" = lib.mkForce 1; systemd.network.networks.ctr0 = { name = "ctr0"; @@ -312,6 +311,9 @@ in { ConfigureWithoutCarrier = true; DHCPServer = "yes"; }; + dhcpServerConfig = { + DNS = "9.9.9.9"; + }; }; systemd.network.netdevs.ctr0.netdevConfig = { Kind = "bridge"; @@ -344,6 +346,12 @@ in { networking.useHostResolvConf = false; networking.useNetworkd = true; + services.resolved = { + enable = true; + extraConfig = '' + Domains=~. + ''; + }; systemd.network = { enable = true; networks.eth0 = { |