NixOS Containers: Difference between revisions

imported>Onny
mNo edit summary
imported>Onny
Add workarounds for nameserver and IPv6 connectivity
Line 12: Line 12:
   internalInterfaces = ["ve-+"];
   internalInterfaces = ["ve-+"];
   externalInterface = "ens3";
   externalInterface = "ens3";
  # Lazy IPv6 connectivity for the container
  enableIPv6 = true;
};
};


Line 19: Line 21:
   hostAddress = "192.168.100.10";
   hostAddress = "192.168.100.10";
   localAddress = "192.168.100.11";
   localAddress = "192.168.100.11";
  hostAddress6 = "fc00::1";
  localAddress6 = "fc00::2";
   config = { config, pkgs, ... }: {
   config = { config, pkgs, ... }: {


Line 34: Line 38:
       allowedTCPPorts = [ 80 ];
       allowedTCPPorts = [ 80 ];
     };
     };
    # Manually configure nameserver. Using resolved inside the container seems to fail
    # currently
    environment.etc."resolv.conf".text = "nameserver 8.8.8.8";


   };
   };