Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { ... }:
- {
- networking = {
- nat = {
- enable = true;
- externalInterface = "enp3s0";
- externalIP = "192.168.2.11";
- forwardPorts = [
- { sourcePort = 25565; destination = "192.168.3.3"; }
- ];
- internalIPs = [ "192.168.3.3/32" ];
- };
- };
- containers.mc1 = {
- autoStart = true;
- privateNetwork = true;
- hostAddress = "192.168.3.2";
- localAddress = "192.168.3.3";
- config = { config, pkgs, ... }: {
- environment.systemPackages = with pkgs; [
- jdk8 screen
- ];
- networking = {
- firewall.allowedTCPPorts = [ 25565 ];
- hostName = "mc1.earthtools.ca";
- };
- users.extraUsers.mc1 = {
- isNormalUser = true;
- uid = 1020;
- };
- services = {
- openssh = {
- enable = true;
- permitRootLogin = "yes";
- };
- };
- };
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement