Merge pull request #122810 from lukegb/docker-and-nat

nixos/docker: fix evaluation when NAT is enabled too
This commit is contained in:
Luke Granger-Brown 2021-05-13 17:28:55 +01:00 committed by GitHub
commit 7b056fe82d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -151,8 +151,8 @@ in
config = mkIf cfg.enable (mkMerge [{
boot.kernelModules = [ "bridge" "veth" ];
boot.kernel.sysctl = {
"net.ipv4.conf.all.forwarding" = mkOverride 99 true;
"net.ipv4.conf.default.forwarding" = mkOverride 99 true;
"net.ipv4.conf.all.forwarding" = mkOverride 98 true;
"net.ipv4.conf.default.forwarding" = mkOverride 98 true;
};
environment.systemPackages = [ cfg.package ]
++ optional cfg.enableNvidia pkgs.nvidia-docker;