modules/system/containers: enable nat for container interfaces
This commit is contained in:
parent
9a4289e6f3
commit
713235a92d
1 changed files with 13 additions and 0 deletions
|
@ -85,6 +85,14 @@ let
|
|||
|
||||
services.openssh.hostKeys = [ ];
|
||||
system.stateVersion = lib.mkDefault config.system.stateVersion;
|
||||
|
||||
networking = lib.mkDefault {
|
||||
useHostResolvConf = false;
|
||||
nameservers = [
|
||||
"1.1.1.1"
|
||||
"1.0.0.1"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
bindMounts = {
|
||||
|
@ -95,6 +103,11 @@ let
|
|||
privateNetwork = lib.mkForce true;
|
||||
}
|
||||
) config.settei.containers;
|
||||
|
||||
networking.nat = lib.mkIf (config.settei.containers != { }) {
|
||||
enable = true;
|
||||
internalInterfaces = [ "ve-+" ];
|
||||
};
|
||||
};
|
||||
|
||||
darwinConfig = lib.optionalAttrs (!isLinux) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue