containers/emerald: enable ipv4 and provide internet access
This commit is contained in:
parent
b3ffc41b76
commit
48db46051d
1 changed files with 12 additions and 0 deletions
|
|
@ -13,6 +13,10 @@
|
||||||
host = subnet 1;
|
host = subnet 1;
|
||||||
client = subnet 2;
|
client = subnet 2;
|
||||||
|
|
||||||
|
subnet4 = x: "10.30.${subnetId}.${toString x}";
|
||||||
|
host4 = subnet4 1;
|
||||||
|
client4 = subnet4 2;
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
];
|
];
|
||||||
|
|
@ -21,6 +25,12 @@
|
||||||
inherit modules;
|
inherit modules;
|
||||||
};
|
};
|
||||||
nixosModule = { ... }: {
|
nixosModule = { ... }: {
|
||||||
|
networking.nat = {
|
||||||
|
enable = true;
|
||||||
|
enableIPv6 = true;
|
||||||
|
internalInterfaces = [ "ve-${name}" ];
|
||||||
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."${fqdn}" = {
|
services.nginx.virtualHosts."${fqdn}" = {
|
||||||
useACMEHost = "lava.moe";
|
useACMEHost = "lava.moe";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
@ -38,6 +48,8 @@
|
||||||
containers.${name} = {
|
containers.${name} = {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
|
hostAddress = host4;
|
||||||
|
localAddress = client4;
|
||||||
hostAddress6 = host;
|
hostAddress6 = host;
|
||||||
localAddress6 = client;
|
localAddress6 = client;
|
||||||
# privateUsers = "pick";
|
# privateUsers = "pick";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue