nix/nixos/hosts/framework-server/containers.nix
2024-03-27 10:10:20 +09:00

18 lines
614 B
Nix

{ lib, self, inputs, outputs, stateVersion, hmStateVersion, ... }:
let
libx = import ../../../lib { inherit lib self inputs outputs stateVersion hmStateVersion; };
lanInterface = "enp0s13f0u4";
in {
containers = {
rdesktop = libx.mkContainer { hostname = "rdesktop"; };
};
networking = {
nat.enable = true;
nat.internalInterfaces = [ "ve-+" ];
nat.externalInterface = lanInterface;
nat.extraCommands = ''iptables -t nat -A POSTROUTING -o ${lanInterface} -j MASQUERADE'';
networkmanager.unmanaged = [ "interface-name:ve-*" ];
firewall.trustedInterfaces = [ "ve-+" ];
};
}