Skip to content

Instantly share code, notes, and snippets.

@LnL7
Created September 2, 2018 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LnL7/bd2f9e914ab1d62ef9a19b1f914d472d to your computer and use it in GitHub Desktop.
Save LnL7/bd2f9e914ab1d62ef9a19b1f914d472d to your computer and use it in GitHub Desktop.
{ config, lib, pkgs, ... }:
{
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
networking.nat.enable = true;
networking.nat.internalInterfaces = ["ve-+"];
networking.nat.externalInterface = "enp0s31f6";
containers.foo.config =
{ config, pkgs, ... }:
{
systemd.services.foo = {
description = "test service bar";
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "oneshot";
serviceConfig.ExecStart = "${pkgs.coreutils}/bin/true";
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment