Skip to content

Instantly share code, notes, and snippets.

@Thra11
Created April 11, 2020 17:16
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 Thra11/801d8f5dc146e4b62732d659639b734c to your computer and use it in GitHub Desktop.
Save Thra11/801d8f5dc146e4b62732d659639b734c to your computer and use it in GitHub Desktop.
{ config, pkgs, ... }:
{
networking.macvlans.mv-wlan0-host = {
interface = "wlan0";
mode = "bridge";
};
networking.interfaces.wlan0.ipv4.addresses = pkgs.lib.mkForce [];
networking.interfaces.mv-wlan0 = {
ipv4.addresses = [ { address = "192.168.1.1"; prefixLength = 24; } ];
};
containers.my-container = {
autoStart = true;
macvlans = [ "wlan0" ];
config = { config, pkgs, ... }:
{
networking.interfaces.mv-wlan0 = {
ipv4.addresses = [ { address = "192.168.1.20"; prefixLength = 24; } ];
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment