Skip to content

Instantly share code, notes, and snippets.

@chrisfarms
Created June 13, 2014 00:42
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 chrisfarms/fc876454047b30b86d20 to your computer and use it in GitHub Desktop.
Save chrisfarms/fc876454047b30b86d20 to your computer and use it in GitHub Desktop.
Example config for 4 machines on 2 serperate seperate vlans
{config, pkgs, ...}:
{
imports = [
../virtualisation/guests.nix
];
virtualisation.guests = {
red1 = {
config = ./test1.nix;
networks = {
red_lan = {
ipAddress = "10.0.1.100";
prefixLength = 24;
};
};
};
red2 = {
config = ./test1.nix;
networks = {
red_lan = {
ipAddress = "10.0.1.101";
prefixLength = 24;
};
};
};
blue1 = {
config = ./test1.nix;
networks = {
blue_lan = {
ipAddress = "10.0.1.100";
};
};
};
blue2 = {
type = "lxc";
config = ./test1.nix;
networks = {
blue_lan = {
ipAddress = "10.0.1.101";
};
};
};
};
# public-facing interface for communication with the outside world.
virtualisation.publicInterface = "enp5s0";
# Configure other machines to GRE tunnel to
virtualisation.tunnels = [ "192.168.2.2" ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment