nextcloud: add network to container

this appears to break nix in a way in which nix should not be possible to break.
This commit is contained in:
stuebinm 2021-03-26 00:11:06 +01:00 committed by schweby
parent 2e9dc554df
commit a04a3c917f
No known key found for this signature in database
GPG key ID: B880491D046E2F87

View file

@ -19,8 +19,8 @@
autoStart = true; autoStart = true;
privateNetwork = true; privateNetwork = true;
hostAddress6 = "fd00::10:1"; hostAddress = "192.168.110.1";
localAddress6 = "fd00::10:2"; localAddress = "192.168.110.10";
config = { pkgs, ... }: { config = { pkgs, ... }: {
@ -44,7 +44,7 @@
# there's also a adminpassFile option, but for testing this seems # there's also a adminpassFile option, but for testing this seems
# enough (less fiddling with getting the file into a nixos # enough (less fiddling with getting the file into a nixos
# container for ad-hoc setups) # container for ad-hoc setups)
adminpass = "root"; adminpass = "lushfjwebrwhjebr";
adminuser = "root"; adminuser = "root";
}; };
@ -113,13 +113,28 @@
after = ["postgresql.service"]; after = ["postgresql.service"];
}; };
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.enable = false;
services.coredns = {
enable = true;
config = ''
.:53 {
forward . 1.1.1.1
}
'';
};
}; };
}; };
services.nginx.virtualHosts."cloud2.infra4future.de" = { services.nginx.virtualHosts."cloud2.infra4future.de" = {
locations."/".proxyPass = "http://[${config.containers.nextcloud.localAddress6}]:80"; locations."/".proxyPass = "http://${config.containers.nextcloud.localAddress}:80";
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
}; };
networking.nat.enable = true;
networking.nat.internalInterfaces = ["ve-nextcloud"];
networking.nat.externalInterface = "enp6s0";
} }